wscript.shell Run file with space in path - SOLVED



i did:

"C:\Program Files\7-Zip\7z.exe e C:\temp\4\7-Zip.7z -y -oc:\temp\4\ *.txt -r"

and i did:

Set shep = WScript.CreateObject("WScript.Shell")
shep.Run """C:\Program Files\7-Zip\7z.exe"" e C:\temp\4\7-Zip.7z -y -oc:\temp\4\ *.txt -r"

and in both cases all worked great :).

if in wsh script we have file paths with "spaces" then we need to embrace those paths with- ""file path"".

in my case it is ""C:\Program Files\7-Zip\7z.exe""
hope this will help :)
.