Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

How to? Handling filenames with blanks at command line

Sep
34
0
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.
 
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
 
In my 4START.BTM, I have;

Code:
set .*=start /pgm

Someone posted this method many years ago, which seems to work well for me.

Joe
 
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

Back
Top