In a previous millennium I used an alias to change directories with a @select-box:
XX=(DIR/ad/km|set w=%@SUBSTR[%@select[con,1,30,23,75,Huidige dir: %_CWD ],0,12]^iff %w=. then^x^else^cd %w^XX^endiff)
In the years in between someone, somewhere decided that - amongst other things - 640k was no longer enough, we needed longer than 8.3 filenames, the DIR layout had to change... the list goes on.
Long story short: this alias is now in a very defunct state.
But as I liked the possibility to change directories "interactive", I decided to bring it to the 21st century.
It opens a SELECT-box through which you can "browse" until you reach your destination.
[Enter] on the current directory (".") or [Esc] brings you back to the prompt in the new directory.
You can give it a start-directory (any CDD parameter will do), but if you don't, it wil start in the current directory.
Edit this is a recursive alias: it calls itself.
So, if you want to give it a different name (which you probably will), don't forget to replace the XX at the end of the alias.
I know there is now @GETDIR and @GETFOLDER to select a directory (you could even use alias XX=`%@GETDIR[.]` to get the job done), but I don't like the fact that it's not very user-friendly without a mouse.
Maybe there are other options, but this has to do for now.
XX=(DIR/ad/km|set w=%@SUBSTR[%@select[con,1,30,23,75,Huidige dir: %_CWD ],0,12]^iff %w=. then^x^else^cd %w^XX^endiff)
In the years in between someone, somewhere decided that - amongst other things - 640k was no longer enough, we needed longer than 8.3 filenames, the DIR layout had to change... the list goes on.
Long story short: this alias is now in a very defunct state.
But as I liked the possibility to change directories "interactive", I decided to bring it to the 21st century.
It opens a SELECT-box through which you can "browse" until you reach your destination.
[Enter] on the current directory (".") or [Esc] brings you back to the prompt in the new directory.
You can give it a start-directory (any CDD parameter will do), but if you don't, it wil start in the current directory.
Code:
alias XX=`CDD %1 & TITLE %CD% & select /1 /a:d-l ("%CD%\") & if "%CD%" ne "%CURDIR%" (set CURDIR=%CD%& XX)`
Edit this is a recursive alias: it calls itself.
So, if you want to give it a different name (which you probably will), don't forget to replace the XX at the end of the alias.
I know there is now @GETDIR and @GETFOLDER to select a directory (you could even use alias XX=`%@GETDIR[.]` to get the job done), but I don't like the fact that it's not very user-friendly without a mouse.
Maybe there are other options, but this has to do for now.
Last edited: