How to? Handling filenames with blanks at command line

Sep 11, 2009
34
0
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 ?

Thanks,
Bob K.
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,689
106
Albuquerque, NM
prospero.unm.edu
Try
Code:
start /pgm "filename with spaces"
Or
Code:
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

Code:
alias s=start /pgm
 
Dec 29, 2009
48
1
Atlanta, GA
I use this one frequently:
Code:
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.
 

Similar threads

M
Replies
4
Views
2K
Support
mathewsdw@sbcglobal.net
M
M
Replies
2
Views
2K
Support
mathewsdw@sbcglobal.net
M