| Re: XP problem passing command arguments with spaces
"Ron G" <sellingforcash@cox.net> wrote in message
news:HyDsh.52648$z16.16221@newsfe10.phx...
> In a VB6 application, any file path with spaces that is passed from
> WindowsXP file explorer will not open in the application. I get a "File
> does not exist". Yet I can open that same file using a common dialog
> box in the application. I can also type the path as an argument from a
> dos prompt.
>
> MyApplication c:\directory with spaces\test.txt
>
> This works from a DOS window but if I double click on the file I get the
> "File does not exist". If I take the spaces out of the path it works
> fine. In window 2000 and before I did not have a problem. Something
> has changed in how XP passes arguments from the file manager.
Surround your file names with double quotes, e.g.
"c:\directory with spaces\test.txt". BTW, DOS is an
operating system, like Linux or Windows. There is no
DOS under Windows. I suspect you mean the "Command
Prompt" when you write "DOS window". |