Page 1 of 1

Directory Hotlist: Use environment variables

Posted: 2019-09-20, 12:09 UTC
by mhewel
I'm using a lot of temporary files, which I store in a structure like this:
"c:\data\temp\<year>\<month>\<day>\",
e.g. "c:\data\temp\2019\09\20\" for files made today

I tried to make an entry in the directory hotlist with this command (which works in a CMD session):
cd c:\data\temp\%date:~6,4%\%date:~3,2%\%date:~0,2%

it looks like environment variables are not used at all, or the command need to be tweaked (escape characters).
Please help

Thanks

/Mikael

Re: Directory Hotlist: Use environment variables

Posted: 2019-09-20, 13:41 UTC
by ghisler(Author)
Environment variables are supported, but not ranges like :~3,2

Re: Directory Hotlist: Use environment variables

Posted: 2019-09-21, 13:05 UTC
by petermad
2mhewel
Try this - make this command in your usercmd.ini file:

Code: Select all

[em_opendatefolder]
cmd=%COMSPEC% /C
param=Start "" %%COMMANDER_EXE%% /O /S /L="c:\data\temp\%%date:~6,4%%\%%date:~3,2%%\%%date:~0,2%%"
iconic=1
And then put em_opendatefolder in the "Command:" field of your Directory hotlist entry.

You can also use em_opendatefolder in a Button on the buttonbar or assign it to a Keyboard shortcut or use it in the Start menu or the Main menu, and use it on the command line.

EDIT
Unfortunately the /S parameter is not supported when used in the directory hotlist - so the dir is always opened in the left panel, not the source panel. It works OK in Buttons, Start menu and Command line - just not in Directory hotlist.