添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
I'm a little newish to DOS and command prompt but have made a few batch files.
I know that opening command prompt and echo %path% will return the environmental variables of PATH (the locations that are associated with it)
Im wondering why doesn't echo %COMMANDER_PATH% return anything?
Thanks,
Jimmy
The reason why i'm interested in this is because I am moving the totalcmd directory around from device to device and from hard-drive to hard-drive.
windows10 Taskbar shortcut:
"C:\Program Files (x86)\totalcmd\TOTALCMD64.EXE"
which no longer works if I create a new copy in another location and delete the original copy.
I had hoped that if I made the windows10 Taskbar shortcut:
"%path%\totalcmd\TOTALCMD64.EXE"
it would search all the path locations, checking until it found TOTALCMD64.EXE and then open that.
Does anyone if this is possible, or a better solution?
I *think I might*, be able to do something like this using a batch file but that seems like a lot of work for something that should already exist.
Let me know what you think,
Jimmy
echo %COMMANDER_PATH%
does return something, but ONLY if you open cmd.exe from within Total Commander.
%COMMANDER_PATH% isn't defined in the system, because you could have multiple running Commanders from different directories at the same time. Total Commander sets it at runtime in its own process. When you start a process like cmd.exe, it inherits these variables from the program which started it.
Im wondering why doesn't echo %COMMANDER_PATH% return anything?
It will only show the path if TC is runing and you run the command from a command prompt that is started from TC.
I had hoped that if I made the windows10 Taskbar shortcut:
"%path%\totalcmd\TOTALCMD64.EXE"
it would search all the path locations, checking until it found TOTALCMD64.EXE and then open that.
You cannot use %path% this way - %path% is a list of paths, you cannot just append anything to that list in the way you tried. You could add c:\totalcmd\ permanently to the %path% (see * below), and then just write TOTALCMD64.EXE in the Target field, but the problem is that Windows will automatically insert c:\totalcmd\ in front of TOTALCMD64.EXE when you close the shortcut properties dialog.
You can make environtment variables work in a shortcut like this:
1. Run SystemPropertiesAdvanced.exe
2. Click on the button "Environment Variables..."
3. In the top of the dialog click the "New..." button
4. For Variable name enter somthging unique - like MY_TC
5. For Variable value enter the physical path to TC executable (for example c:\totalcmd\totalcmd64.exe)
6. Press OK 2 times.
Now you can change the shortcut Target to: %MY_TC%
Unfortunately environment variables does not work in Windows' Taskbar , although it works for Desktop shortcuts. So you cannot use it in the Taskbar.
* If you want to add c:\totalcmd\ to the %path% variable, use SystemPropertiesAdvanced.exe and then find and edit the PATH in the bottom of the dialog.
But why don't you just enter the proper path in your shortcut?
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1383a
TC 3.60b4 on Android 6, 13 & 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
  • ↳   Spam trap (do not post here!)
  • ↳   Total Commander (Deutsch)
  • ↳   Total Commander (English)
  • ↳   Total Commander (Français)
  • ↳   Total Commander Pocket
  • ↳   Total Commander for Android
  • ↳   Total Commander for Windows Phone 8.1
  • ↳   Plugins and addons: devel.+support (English)
  • ↳   Total Commander Polls (English)
  • Total Commander bugs and suggestions
  • ↳   TC11.x bug reports (English)
  • ↳   TC suggestions (English)
  • ↳   TC10.x bug reports (English)
  • ↳   TC9.5x bug reports (English)
  • ↳   TC9.2x bug reports (English)
  • ↳   TC9.1x bug reports (English)
  • ↳   TC9.0x bug reports (English)
  • ↳   TC8.5x bug reports (English)
  • ↳   TC8.0x bug reports (English)
  • ↳   TC7.56(a)/7.57 bug reports (English)
  • ↳   TC7.5x(a) final bug reports (English)
  • ↳   TC Fixed bugs
  • ↳   TC Behaviour which will not be changed
  • ↳   Bug reports from previous betas (unresolved)
  • User to user forums in other languages
  • ↳   Dutch (Nederlands)
  • ↳   Polish
  • ↳   Slovak and Czech
  • ↳   Spanish (Castellano)
  • ↳   Other forums (links)
  • Powered by phpBB ® Forum Software © phpBB Limited
    Imprint/Impressum: This site is maintained by Ghisler Software GmbH
    Privacy Policy | Datenschutzerklaerung | Politique de Confidentialite