How to? Handling filenames with blanks at command line

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
Sep 11, 2009
Portland, Or.
I often use the command line to view (read, watch, etc) files by issuing "START fn".

When the 'fn' is long, I enter it as "START *unique", hit TAB and TC fills in the full name (based on the unique character identifying the file) - with the proper quotes around the filename when there are blanks in the name.

BUT, upon hitting the enter key, TC opens a new session of TC - title of that filename - but does not start the operation..

IF I rename the file such that blanks become, say, underscores.. it works as expected. Since TC added those quotes, I assume that the quoted string should have been treated as an complete file than to START..

Am I missing some understanding or is this a bug in my TC v11.0 ?

Bob K.

Charles Dye

Super Moderator
Staff member
May 20, 2008
Albuquerque, NM
start /pgm "filename with spaces"
start "" "filename with spaces"
Like a number of other annoyingly dumb features, this syntax is for CMD.EXE compatibility. Being basically lazy, I prefer to

alias s=start /pgm
Dec 29, 2009
Atlanta, GA
I use this one frequently:
alias run=`(for %ff in (%$) echo %ff) & (for %ff in (%$) do %@QUOTE[%ff])`
It's useful because I can type "run *something*" and run the one file, or even many files. The alias is broken up into two for-loops for a reason: if it starts spewing more than I expected, I can generally break out of it before too much gets started.