Command Will Not Run Using Short Name of Path

Jun 2, 2008
376
2
Newton, MA
I have an alias to launch Thunderbird using the command line "C:\PROGRA~2\MOZILL~2\THUNDE~1.EXE", which is the short file name for the path. When I run the alias or run the command line directly from the prompt, I get an error message that the command is not valid. The partially short file name "C:\PROGRA~2\Mozilla Thunderbird\thunderbird.exe" launches the program. So does the full long path name or

%@quote[%@lfn[C:\PROGRA~2\MOZILL~2\THUNDE~1.EXE]]

Can someone explain this? By the way, other aliases that use short file names that contain only a single tilde do work, so that may have something to do with the issue.
 
Jun 2, 2008
376
2
Newton, MA
I often use short file names so that I can copy paths to the clipboard and then use them without having to add quotation marks when the long path name contains spaces. So, for example, when I CDD to my Dropbox directory, I go to

C:\Users\Jay\DOCUME~1\mydrop~1

instead of

C:\Users\Jay\Documents\My Dropbox

and that's what then shows in the prompt and can be selected and copied.

When I try running the command for Thunderbird, an error is thrown to OnError.btm, which results in the following:

TCC(25.00.26): C:\>C:\PROGRA~2\MOZILL~2\THUNDE~1.EXE

OnError.btm: Not a valid command. You may edit it or
press ENTER to abort it.

C:\PROGRA~2\MOZILL~2\THUNDE~1.EXE


OK. I finally figured out how to turn off my error-processing batch file. Now this is what I get:

TCC(25.00.26): C:\tcmd\ver25>C:\PROGRA~2\MOZILL~2\THUNDE~1.EXE
TCC: Unknown command "C:\PROGRA~2\MOZILL~2\THUNDE~1.EXE"
 
Jun 2, 2008
376
2
Newton, MA
Run OPTION / Startup, and enable "Search for SFNs". (And be prepared for some very unpleasant surprises if you use SFNs with DEL, DO, FOR, MOVE, REN, etc.)

I think I'll pass on that! For the aliases that invoke programs, I'll use long-file-name paths, at least when the short one doesn't work. For the directory-changing aliases, I'll continue to use the short names, which seem to be working fine.

I take it that you don't have any explanation for why that one particular SFN fails when all my other ones seem to work fine. As I mentioned, the only thing I could think of was that there were two tilde characters in the short name.

After writing the above, I decided to experiment a little more. Two tilde characters is not the issue, since other similar SFNs work just fine. My next theory is that the problem appears when the program name itself is long. The following command failed:

TCC(25.00.26): C:\PROGRA~2\OverDrive Media Console>C:\PROGRA~2\OVERDR~1\MEDIAC~1.EXE

The long version runs fine:

"C:\Program Files (x86)\OverDrive Media Console\MediaConsole.exe"

Indeed, the command fails when I use the long name except for the program itself:

"C:\Program Files (x86)\OverDrive Media Console\MEDIAC~1.EXE"

This command runs fine:

TCC(25.00.26): C:\>C:\PROGRA~1\MOZILL~1\firefox.exe
 
Similar threads
Thread starter Title Forum Replies Date
P Run as Admin tab in non-elevated Take Command session? Support 9
C How to? run a batch file in administrator mode while debugging in take command software Support 1
tmaynard How to? Any way to run a command in a new tab at startup? Support 18
M Installed but can't run Take Command 16.0 Support 5
B Select and run lines from Command Input panel? Support 1
A How to? Run a TCC command from external program Support 2
M How to? Run a command (alias, actually) on a "timed" basis... Support 13
D Can alias pass parameters to for command? Support 3
samintz How to? Search for %(command) in Help? Support 1
T VIEW only works from command line Support 14
rconn News Take Command / TCC / CMDebug / TCC-RT v28 Released Support 0
T Take Command 28: Lua reports version 5.4.0 (5.4.3 expected) Support 0
Jay Sage WAD Possible Bug With OPTION Command With @FILE Support 5
rconn News Take Command / TCC / CMDebug / TCC-RT 27.01.24 uploaded Support 0
J Take command does not start on Windows 10 Support 3
vefatica `Back quotes` - command line vs. batch file Support 5
Jay Sage WAD Failure of Alias Command with /Z Option Support 14
Phileosophos Is there any way to open the Take Command options dialog from the command line? Support 8
Phileosophos Command-line Editing Shortkeys That Fail Support 6
fpefpe How to? free (internal) command Support 0
rconn News Take Command / TCC / CMDebug / TCC-RT 27.01.23 uploaded Support 0
T How to? retain command history across reboot? Support 6
rconn News Take Command / TCC / CMDebug / TCC-RT v27.01 Build 22 Uploaded Support 0
Jay Sage Bug With Flow Control and/or Command Grouping Support 2
GermanDirk How to? EVENTLOG Command with simple User Rights not functional Support 4
Jay Sage Take Command Is Too Fast! Support 4
Jay Sage Comparison of IF with Command Group and IFF Support 6
D Open Windows 10 Photos app from command line Support 11
rconn News Take Command / TCC / CMDebug / TCC-RT 27.0.21 uploaded Support 0
rconn News Take Command / TCC / CMDebug / TCC-RT 27.0.20 uploaded Support 0
U Can not get/start Take Command gui Support 1
rconn News Take Command / TCC / CMDebug / TCC-RT 27.0.19 Support 0
S Increasing Font Point Size in Command Tabs Support 2
mfarah Fixed The DATE command produces the wrong error message. Support 1
vefatica Command name mix-up Support 3
FreezerBurnt "Missing SETLOCAL" when initializing Visual Studio Command Prompt. Support 9
E How to? Closing desktop created by DESKTOP command Support 10
rconn News Take Command / TCC / CMDebug / TCC-RT v27.0.18 Support 0
K Take Command fox XP? Support 7
Joe Caverly Documentation Replace internal command with LIBRARY command Support 0
fpefpe How to? command echo in title line/bar Support 2
U Command help on file names Support 5
vefatica Command line DO with no closing parenthesis? Support 9
vefatica Command history search is off Support 7
H How to? How can I say "if the command separator is not ~ then setdos /C~" Support 8
N Command execution slows down in TCC Prompt after a while Support 6
R Long commands retrieved from command history have blank line when wrapped Support 20
jpeni Take Command Language Examples Support 1
rconn News Take Command / TCC / CMDebug / TCC-RT 26.02.41 Uploaded Support 0
fpefpe winfr command Support 4

Similar threads