Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

CD with a "browser GUI"

Aug
376
9
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.

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:
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.
What's mouse-unfriendly about @GETDIR?
 
Nothing wrong if you use a mouse. Trouble starts if you DON'T use a mouse..
("Don't ... Not ... Without ... Note to self: never use triple negation again :-)

For example: You have to [Tab] your way around.
[Tab][Enter] to go one level up; [Tab][Tab][Tab](cursor keys) [Enter] to go one level down.
Other keyboard shortcuts (Alt-Up, Backspace,...) are OS dependant.

I don't like it. BTW: I prefer the keyboard anyway :-)

Maybe you could test the alias to "feel" the difference?
 
Well, English isn't my native language (or second language), so I assumed (and will continue to do so) it was my mistake.
 
Back
Top