PDA

View Full Version : Problem with paths


adamdelves
05-27-2001, 02:21 PM
WshShell.run("c:\program files")

When running an application whos path has a directory containing a space WSH comes up with an error just the same as if you type in he path in the windows run command with out it being enclosed in "" . Is there any way to get round this problem- I've tried everything

RWSchlatter
05-27-2001, 11:27 PM
try : WshShell.run("""c:\program files""")
(outer quotes define a string as parameter, the inner double quotes get reduced to single quote within the string and contain the path with space)

______________
Regards - Richard

rjessop
08-01-2001, 10:19 AM
Hi There,
I have tried doing as you suggest, for example....
WshShell.Run(""C:\Program Files\NetMeeting\CONF.EXE"") but I still get any error because of the space in the filename. Any other suggestions anybody?
thanks, paul.

RWSchlatter
08-03-2001, 07:04 PM
did you try adding a third quote to each pair (as your coding shows now) ?

______________
Regards - Richard

prasad
08-08-2001, 05:20 AM
Yes it is working now!!