I am trying to make a relative shortcut using a batchfile and a program to turn the batch in an exe program with an icon.
I need a 'shortcut' to open the next alfabetic parallel folder in an explorer window and one to open the previous. Ideally I would even like it to to close the explorer window used to doubleclick it.
I have so far:
@echo off
echo %cd%
for %%a in ("%cd%") do set folder=%%~na
pushd ..
echo %folder%
echo .
dir /A:D /B
pause
the %folder% has the name of the folder (not path!) from where the batch is executed.
the line: dir /A:D /B gives you an output of multiple lines giving you all the parallel folders (because I go up a level using pushd ..). I really need to find a way to search for the %fodler% value and pick the line above, or below it.
I tried something using for /f but it is not that usefull when processing multiple lines instead of one single string.
anny ideas?