escaping DOS
Kenneth Brody
kenbrody at spamcop.net
Wed Oct 3 13:45:30 PDT 2012
On 10/3/2012 3:55 PM, Ryan Powers wrote:
> Here's a new one in my big book of bugs. End-user created a Windows
> username, e.g. Jon&Jane
>
> Does anyone see a problem there? We have a program that calls filePro and
> uses the %tmp%, i.e. c:\users\Jon&Jane.
> It turns out that ampersands are illegal in DOS. I tried to escape it, as in
> Jon\&Jane but that doesn't work either. Are escapes even possible?
>
> I've posted here first since this might enlighten other filePro users.
NT's cmd.exe (used by XP, Vista, Windows 7, etc.) uses "&" as a command
separator, like ";" on *nix. There's nothing "illegal" about them in a
filename.
dir & echo hello & pause
Put the filename in quotes, which will also take care of spaces and other
"problematic" punctuation.
--
Kenneth Brody
More information about the Filepro-list
mailing list