Directory Hotlist: Use environment variables

Please report only one bug per message!

Moderators: sheep, Hacker, Stefan2, white

Post Reply
New Member
New Member
Posts: 1
Joined: 2019-03-21, 08:00 UTC

Directory Hotlist: Use environment variables

Post by *mhewel » 2019-09-20, 12:09 UTC

I'm using a lot of temporary files, which I store in a structure like this:
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



User avatar
Site Admin
Site Admin
Posts: 38451
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland

Re: Directory Hotlist: Use environment variables

Post by *ghisler(Author) » 2019-09-20, 13:41 UTC

Environment variables are supported, but not ranges like :~3,2
Author of Total Commander

User avatar
Power Member
Power Member
Posts: 8984
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark

Re: Directory Hotlist: Use environment variables

Post by *petermad » 2019-09-21, 13:05 UTC

Try this - make this command in your usercmd.ini file:

Code: Select all

cmd=%COMSPEC% /C
param=Start "" %%COMMANDER_EXE%% /O /S /L="c:\data\temp\%%date:~6,4%%\%%date:~3,2%%\%%date:~0,2%%"
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.

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.
License #524 (1994)
Danish Total Commander Translator
TC 9.5b8 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1909) 64bit, 'Everything' (x64)
TC 3.0b12 on Android 6.0
Get: Extended Total Commander Menus | PHSM-Calendar

Post Reply