By registering with us, you'll be able to discuss, share and exchange private messages with other members of our community.
SignUp Now!> Something i would like to see is to be able to change to directories like 'sendto' or 'program files' by way of cd shell:sendto or something.
>
> Typing shell:sendto will open the correct folder in explorer.
>
>
>
>
Unfortunately using something like %userprofile%\ etc does not work, because these are in different directories according to the windows version.
You could do it by the means i do it:
cdd %_regquery["HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Sendto"]%
I mean is it possible to shorten this to something like
cdd %_shfolder[Sendto]%
where _shfolder would search HKCU and HKLM (in that order) for the relevant folder?
@echo off
rem File C:\work\shellfolder.btm
rem Dave Cantor, 13 Nov 2009
set targdir=%1
set x=-1
if not defined targdir goto done
do regkey in /L HKCU HKLM
set x=%@regquery["%regkey%\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\%targdir"]
if "%x" ne "-1" leave
enddo
:done
echo %x
quit
function shellfolder=`%@execstr[c:\work\shellfolder.btm %$]`
echo %@shellfolder[sendto]
version.> Unfortunately using something like %userprofile%\ etc does not work,
> because these are in different directories according to the windows
>
> You could do it by the means i do it:
>
> cdd %_regquery["HKCU\Software\Microsoft\Windows\CurrentVersion\Exp
> lorer\Shell Folders\Sendto"]%
>
> I mean is it possible to shorten this to something like
>
> cdd %_shfolder[Sendto]%
>
> where _shfolder would search HKCU and HKLM (in that order) for the
> relevant folder?
>
>
TCC already has this function built-in. See @SHFOLDER[].
Yes, but the original poster is looking for a way of specifying the name of the folder, not a number.
alias sendto:=%@shfolder[9]\
works for me.Code:alias sendto:=%@shfolder[9]\
sendto> Quote:
>
> Originally Posted by Charles Dye [image removed]
> Code:
> alias sendto:=%@shfolder[9]\
> works for me.
>
> Well, sure, but I interpreted the original poster's request as using
> as an example. I suspect he wants to be able to find Desktop, Fonts,
> and the other special folders as well. My response was for the
> general case, but not quite complete, of course.
>
> In my .btm that I posted, replace the single occurrence of "%1" with
> "%$" without quotation marks.
>
>