%$LOCAL_APPDATA% can not be used for TreeFileLocation
Moderators: Hacker, petermad, Stefan2, white
%$LOCAL_APPDATA% can not be used for TreeFileLocation
Hi!
I have added
TreeFileLocation=%$LOCAL_APPDATA%\Ghisler\treeinfo-%D%.wc
option to wincmd.ini. Unfortunately, TC does not create the tree file although folder %$LOCAL_APPDATA%\Ghisler exists.
On the other side %$LOCAL_APPDATA% can be used for thumbnails:
ThumbsLocation=%$LOCAL_APPDATA%\Ghisler
I have added
TreeFileLocation=%$LOCAL_APPDATA%\Ghisler\treeinfo-%D%.wc
option to wincmd.ini. Unfortunately, TC does not create the tree file although folder %$LOCAL_APPDATA%\Ghisler exists.
On the other side %$LOCAL_APPDATA% can be used for thumbnails:
ThumbsLocation=%$LOCAL_APPDATA%\Ghisler
Confirmed. I'm using same value here:
Code: Select all
TreeFileLocation=%$LOCAL_APPDATA%\GHISLER\tree_%D%.wc
- ghisler(Author)
- Site Admin
- Posts: 50475
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Unfortunately only real environment variables are available in this function. I cannot use the special env replacement function because of the %D%, it would be mistaken for an env var too...
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- Balderstrom
- Power Member
- Posts: 2148
- Joined: 2005-10-11, 10:10 UTC
In the code listed below,
This is a small section of my RunTC.cmd
Notice we have SET APPLOCAL, and now you can use
%APPLOCAL%\Ghisler, in your wincmd.ini
You can get rid of all the set's if you prefer, just keep APPLOCAL and change the START line to
START "" "Full\Path\To\Your\Install\of\TotalCMD.exe"
The usefulness of setting these Environment Variables, Makes it so they can be used in your ButtonBar menu's, UserCommands, TC's command-line, etc etc.
Then if you reinstall your system or change your username or whatever, all you need to do is change a couple lines in your RunTC.cmd and all your data in wincmd.ini and buttonBars, etc, will be correct.
- Delete any SET's you don't want.
- Save to a file, aka: RunTC.cmd
- Create a Shortcut to RunTC.cmd
- RightClick & Properties on the Shortcut,
- Choose: Run Minimized
- [Change Icon], select TotalCMD.exe for the ICON.
This is a small section of my RunTC.cmd
Code: Select all
@ECHO OFF
SET APPLOCAL=%USERPROFILE%\Local Settings\Application Data
SET TC=%ProgramFiles%\TotalCMD
SET TCmd=%TC%\TotalCMD.exe
SET TCDATA=%APPDATA%\_TC_
SET TCTOOL=%wuBIN%\TCTools
SET TCMC=%TCTOOL%\TCMC.exe 50
:: junction -d "%TC%\Data"
:: junction "%TC%\Data" "%TCDATA%"
START "" "%TCmd%"
%APPLOCAL%\Ghisler, in your wincmd.ini
You can get rid of all the set's if you prefer, just keep APPLOCAL and change the START line to
START "" "Full\Path\To\Your\Install\of\TotalCMD.exe"
The usefulness of setting these Environment Variables, Makes it so they can be used in your ButtonBar menu's, UserCommands, TC's command-line, etc etc.
Then if you reinstall your system or change your username or whatever, all you need to do is change a couple lines in your RunTC.cmd and all your data in wincmd.ini and buttonBars, etc, will be correct.
Thanks for supporting it in 7.56! 
Works great!

Code: Select all
TreeFileLocation=%$LOCAL_APPDATA%\GHISLER\tree_%D%.wc
- ghisler(Author)
- Site Admin
- Posts: 50475
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact: