Welcome!

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

SignUp Now!

Declined Automatic quotes around filenames that contain spaces

Mar
12
2
Many people think that filenames with spaces are a good idea. If you want to copy or edit such files, you must enclose these filenames with quotation marks. It would be nice if the command line had some kind of artificial intelligence that recognizes that a string containing blanks is a valid file name and automatically surrounds it with quotation marks. Such a match could compare the directory listing with the command line, taking into account any possible path information.
There is already some functionality when selecting a file with TAB, but it does not work when typing or pasting filnames containing blanks.
 
Last edited:
That could be a problem when using partial filenames, e.g.:

Set TMP_DIR=C:\MyFiles\New stuff

Set Outfile=Target File.txt

IF EXIST "%TMP_DIR\%Outfile" echo Target File.txt exists
 
Back
Top