I use this batch file. It works under CMD etc, and not only changes to the desired directory, but you can open the folder in explorer.
You can have your own 'special' folders on top of this. This is what HKLM\Software\Wendy\Folders does. So for example, if I want to show what's in the mail-downloads, I run cdf /o email
The regkey is maintained in my setup files. It's simply a batch file, designed to connect the copied software to the shell, through reg.exe calls.
One of the joys of the private setup is I maintain my own menu, directly connected to the same folders.
Code:
:: set folders for windows 2k, xp [0config.cmd]
set zreg=Software\Wendy\Folders
...
reg add HKLM\%zreg% /f /v appdir /d %zwin%
reg add HKLM\%zreg% /f /v appdata /d %zapp%
reg add HKLM\%zreg% /f /v batch /d %zdir%\cdata\batch
reg add HKLM\%zreg% /f /v books /d %zbook%
A command "cdf batch" opens the batch file directory.
You can open the standard stuff too, such as cdf sendto
conset is Frank Westlake's utility.
Code:
@echo off
:: cd shell folder.
if /i "%1"=="/?" goto :ttyhelp
if /i "%1"=="" goto :ttyhelp
set zdir=
set zshf=Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
set zapp=Software\Microsoft\Windows\CurrentVersion\App Paths
if /i "%1"=="/m" goto :hklm
if /i "%1"=="/u" goto :hkcu
if /i "%1"=="/w" goto :hkwe
if /i "%1"=="/i" goto :image
if /i "%1"=="/a" goto :happ
set zcmd=chdir
set zhere=%*
if "%1"=="/o" set zcmd=open
if "%1"=="/o" set zhere=%zhere:~3%
conset /q /k zdir=HKLM\%zshf%\%zhere%
if not "%zdir%"=="" goto :doit
conset /q /k zdir=HKCU\%zshf%\%zhere%
if not "%zdir%"=="" goto :doit
conset /q /k zdir=HKLM\Software\Wendy\Folders\%zhere%
if not "%zdir%"=="" goto :doit
goto :end
:hklm
shelexec reg:hklm\%zshf%
goto :end
:hkcu
shelexec reg:hkcu\%zshf%
goto :end
:hkwe
shelexec reg:hklm\software\wendy\folders
goto :end
:happ
shelexec reg:hklm\%zapp%
goto :end
:image
set zdir=Microsoft\Windows NT\CurrentVersion\Image File Execution Options
shelexec reg:hklm\software\%zdir%
goto :end
:ttyhelp
echo CDF changes to a directory stored in registry, or shell folder.
echo.
echo /o Open the named folder in explorer.
echo /m Display the shell folders in the machine tree
echo /u Display the shell folders in the user tree
echo /w Display the folders in HKLM\Software\Wendy\Folders
echo /i Display the image settings tree for hacks etc.
echo.
echo name Changes to first instance of name in the above order.
goto :end
:dexe
goto :end
:doit
set zcxm=
if %zcmd%==chdir cd /d %zdir%
if %zcmd%==open shelexec %zdir%
:end
set zdir=