Matthias Tacke said:
If you like to choose which of the open explorer windows should be the
current make a shortcut with this (without line breaks) :
cmd /K for /F "tokens=8,*" %a in ('cmdow /T /F^|findstr "explorer [A-Z]:"') do pushd %b
Requires cmdow.exe from
http://www.commandline.co.uk in a path folder.
It pushes all the folders (with drive letters) to the directory stack.
You may then issue popd commands until the desired folder is current.
And here a batch variant with an on screen menu to select the folder.
::SElFld.cmd:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@echo off & setlocal
for /F "tokens=8,*" %%A in (
'cmdow /T /F^|findstr "explorer [A-Z]:"^|sort /+41') do (
call :Menu "%%B"
)
if not defined MyCnt goto :eof
cls
echo/Select number preceeding desired folder
echo/
for /L %%A in (1,1,%MyCnt%) do (
Call echo/ %%A - %%MyFld%%A%%
if "%count%" LEQ "9" echo/
)
set /P FldNum="Select current folder 1-%MyCnt% :"
if not defined MyFld%FldNum% ECHO MyFld%FldNum% NOT DEFINED & goto :eof
call set MyFld=%%MyFld%FldNum%%%
endlocal & pushd %MyFld%
goto :eof
:Menu Folder
set /A MyCnt+=1
call set MyFld%MyCnt%=%~1
::SElFld.cmd:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
HTH