bobheart Posted September 20, 2004 Posted September 20, 2004 I have 7z zip and trying to zip a folder with the command line but i can't seem to zip the folder ? 7za.exe a -tzip Profiles.zip Profiles That would be a bat file as I know them better but I would like to do it in au3 if I can ? How do you zip the folder and all folders under it with the files ? From the help file . a (Add) command Adds files to archive. Examples 7z a -tzip archive.zip subdir\* adds all files from directory subdir to archive archive.zip. 7z a -tzip Files.zip "Program files\*" -r adds all files from directory Program to archive Files.zip. Switches that can be used with this command -i (Include), -m (Method), -p (Set Password), -r (Recurse), -t (Type of archive), -u (Update), -w (Working Dir), -x (Exclude),
emmanuel Posted September 20, 2004 Posted September 20, 2004 assuming that the executable is in the current folder or path: Run(@comspec " /c 7za.exe a -tzip Profiles.zip Profiles") should work. "I'm not even supposed to be here today!" -Dante (Hicks)
bobheart Posted September 20, 2004 Author Posted September 20, 2004 (edited) Not sure what this is ? ---------------------------AutoIt Error---------------------------Line 1 (File "E:\programs1\zip.au3"):Run(@comspec " /c 7za.exe a -tzip Profiles.zip Profiles")Run(^ ERRORError: Error in expression.---------------------------OK --------------------------- Edited September 20, 2004 by bobheart
Developers Jos Posted September 20, 2004 Developers Posted September 20, 2004 Not sure what this is ? <{POST_SNAPBACK}>just add an & between @comspec and " Run(@comspec & " /c 7za.exe a -tzip Profiles.zip Profiles") SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
bobheart Posted September 20, 2004 Author Posted September 20, 2004 It makes the zip file but nothing in it . it was doing the samething to me when I started trying it .
Developers Jos Posted September 20, 2004 Developers Posted September 20, 2004 It makes the zip file but nothing in it . it was doing the samething to me when I started trying it . <{POST_SNAPBACK}>bob, change the source to the poper full path... Run(@comspec & " /c 7za.exe a -tzip Profiles.zip c:\?????\Profiles") SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
bobheart Posted September 20, 2004 Author Posted September 20, 2004 How would I do @ScriptDir ? I don't know where it will end up at .
emmanuel Posted September 20, 2004 Posted September 20, 2004 just add an & between @comspec and " Run(@comspec & " /c 7za.exe a -tzip Profiles.zip Profiles") <{POST_SNAPBACK}>whoops, my bad... How would I do @ScriptDir ? I don't know where it will end up at . <{POST_SNAPBACK}>Bob, thought you'd have this down by now... Run(@comspec & " /c 7za.exe a -tzip Profiles.zip " & @scriptdir & "\Profiles") "I'm not even supposed to be here today!" -Dante (Hicks)
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