(solved) MultiRenameTool: I need a guide to""[%x%] Insert value of env var""
Moderators: Hacker, petermad, Stefan2, white
(solved) MultiRenameTool: I need a guide to""[%x%] Insert value of env var""
Question:
How should that work in MRT?
- [%x%] Insert value of environment variable "x".
I tested this, but it inserts plain text only into the preview:
[%date%]
[%User%]
[%USER%]
[%COMMANDER_PATH%]
TC 10.00
TC 10.50b5
Windows [Version 10.0.19044.1706]
How should that work in MRT?
- [%x%] Insert value of environment variable "x".
I tested this, but it inserts plain text only into the preview:
[%date%]
[%User%]
[%USER%]
[%COMMANDER_PATH%]
TC 10.00
TC 10.50b5
Windows [Version 10.0.19044.1706]
Re: MultiRenameTool: guide to""[%x%] Insert value of env var""
2Stefan2
Hmm
%date% doesn't work for me too
I haven't environment variable user, but %username% working fine
Other environment variables (that exist in output of set command) working fine for me
TC 10.50b5 x64 / Win 10.0.17763.2928
Hmm
%date% doesn't work for me too
I haven't environment variable user, but %username% working fine
Other environment variables (that exist in output of set command) working fine for me
TC 10.50b5 x64 / Win 10.0.17763.2928
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 11.01 x64, Windows 7 SP1 x64
#259941, TC 11.01 x64, Windows 7 SP1 x64
Re: MultiRenameTool: I need a guide to""[%x%] Insert value of env var""
Yeah, thank, I tried rather with commands than vars, .... if I do it now right, it works
Please forget it, I did it wrong.
Works
[%windir%]
[%USERDOMAIN%]
[%USERNAME%]
[%COMMANDER_PATH%] works now too
Do not
[%hostname%]
[%User%]
[%date%]
Please forget it, I did it wrong.
Works
[%windir%]
[%USERDOMAIN%]
[%USERNAME%]
[%COMMANDER_PATH%] works now too
Do not
[%hostname%]
[%User%]
[%date%]
Re: MultiRenameTool: guide to""[%x%] Insert value of env var""
%date% is not an environment variable, it's a dynamic variable in CMD only. The same applies to %time%, %cd%, %random%, %errorlevel% and some others; see set /? on a CMD, and ss64.com.
For me, [%UserName%] works fine, and also [%COMMANDER_PATH%] is shown correctly in the preview. The former also renames properly, I haven't tested the latter.
%User% doesn't exist by default, only %UserName% does. The latter is also listed in the menu after clicking the [+] button next to the [N] Name button.
What doesn't work for me is using such environment variables in F7 and Shift+F4 dialogs, although the history claims that it works:
Regards
Dalai
For me, [%UserName%] works fine, and also [%COMMANDER_PATH%] is shown correctly in the preview. The former also renames properly, I haven't tested the latter.
%User% doesn't exist by default, only %UserName% does. The latter is also listed in the menu after clicking the [+] button next to the [N] Name button.
What doesn't work for me is using such environment variables in F7 and Shift+F4 dialogs, although the history claims that it works:
Code: Select all
22.09.17 Added: Support environment variables in multi-rename tool, F7 and Shift+F4: [%USERNAME%] or [%USERNAME%1-5] (32/64)
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Re: MultiRenameTool: I need a guide to""[%x%] Insert value of env var""
You are right, thanks.
Me guess I was thinking about "echo %date%" and just tried %date% as like a env var, silly me.
Me guess I was thinking about "echo %date%" and just tried %date% as like a env var, silly me.
- ghisler(Author)
- Site Admin
- Posts: 50550
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: (solved) MultiRenameTool: I need a guide to""[%x%] Insert value of env var""
To use placeholders like [%USERNAME%] in F7 or Shift+F4, you need to start the name with < (smaller than).
This will be added automatically when adding a placeholder via "+" button.
< is used because it is a reserved character which cannot appear in file names.
This will be added automatically when adding a placeholder via "+" button.
< is used because it is a reserved character which cannot appear in file names.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: (solved) MultiRenameTool: I need a guide to""[%x%] Insert value of env var""
2ghisler(Author)
Got it, thanks. That wasn't clear from the history excerpt I posted.
Regards
Dalai
Got it, thanks. That wasn't clear from the history excerpt I posted.
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
- ghisler(Author)
- Site Admin
- Posts: 50550
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: (solved) MultiRenameTool: I need a guide to""[%x%] Insert value of env var""
It's necessary because [%USERNAME%] is a valid name for files and folders.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com