Windows/quotes/"start" (was Re: Having problem getting quotation marks with SYSTEM)
Kenneth Brody
kenbrody at spamcop.net
Tue Nov 15 08:41:49 PST 2011
On 11/15/2011 11:28 AM, Boaz Bezborodko wrote:
[...]
> When I try to open the pdf file with a Windows "Start [filename]" it doesn't
> work with a space and doesn't work with quotation marks.
This is a "design flaw" (IMHO) in the "start" command. If the first
parameter starts with a quote, then it is taken as the title to give the
window. (There is no flag, such as "/title:", to specify this. It's based
purely on the existence of that quote.)
Therefore, this doesn't work as one might expect:
start "c:\path\to\filename with spaces.ext"
Rather than opening the specified file, you will get a new command window,
with the given string as the window title.
I learned long ago to include a null quoted string:
start "" "c:\path\to\filename with spaces.ext"
> I'm sure there a simple edit I can use to strip out spaces, but I just get
> my head around it right now.
>
> (I can get the edit syntax if I spend a bunch of time to grok it, but I then
> forget it until a few years later when I might need it again.)
--
Kenneth Brody
More information about the Filepro-list
mailing list