Command Will Not Run Using Short Name of Path

Jun 2, 2008
315
1
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
315
1
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
315
1
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