Fran Posted September 29, 2010 Share 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) Link to comment Share on other sites More sharing options...
wakillon Posted September 29, 2010 Share Posted September 29, 2010 A space is missing after -x AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
Fran Posted September 29, 2010 Author Share Posted September 29, 2010 The "space" is not the issue. As I said, if I copy the path directly to cmd it works 100% Link to comment Share on other sites More sharing options...
wakillon Posted September 29, 2010 Share 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.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
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