Fran Posted September 29, 2010 Posted September 29, 2010 Hi there, I can't seem to get my command to run from within my autoit script. If I copy the path from input box and paste in command prompt it works, but if I run the rest of the script it simply exits without zipping the files. Any suggestions? #include <Process.au3> InputBox("","","wzzip -x""" & @ScriptDir & "\_tmp\fscommand_basic\*.*"" -p -r """ & "" & @ScriptDir & "\_tmp\test.zip"" """ & @ScriptDir & "\_tmp""") $command = "wzzip -x""" & @ScriptDir & "\_tmp\fscommand_basic\*.*"" -p -r """ & "" & @ScriptDir & "\_tmp\test.zip"" """ & @ScriptDir & "\_tmp""" _RunDOS($command)
wakillon Posted September 29, 2010 Posted September 29, 2010 A space is missing after -x AutoIt 3.3.18.0 X86 - SciTE 4.4.6.0 - WIN 11 24H2 X64 - Other Examples Scripts
Fran Posted September 29, 2010 Author Posted September 29, 2010 The "space" is not the issue. As I said, if I copy the path directly to cmd it works 100%
wakillon Posted September 29, 2010 Posted September 29, 2010 (edited) The "space" is not the issue. As I said, if I copy the path directly to cmd it works 100% If you try like this ? $command = @windosDir & "\wzzip.exe -x """ & @ScriptDir & "\_tmp\fscommand_basic\*.*"" -p -r """ & "" & @ScriptDir & "\_tmp\test.zip"" """ & @ScriptDir & "\_tmp""" ConsoleWrite ( "$command : " & $command & @Crlf ) RunWait ( $command, '', @SW_HIDE ) Is wzzip.exe placed in @windosDir ? Edited September 29, 2010 by wakillon AutoIt 3.3.18.0 X86 - SciTE 4.4.6.0 - WIN 11 24H2 X64 - Other Examples Scripts
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now