Jump to content

zip


bobheart
 Share

Recommended Posts

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),

Link to comment
Share on other sites

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(^ ERROR

Error: Error in expression.

---------------------------

OK 

---------------------------

Edited by bobheart
Link to comment
Share on other sites

  • Developers

Not sure what this is ?

<{POST_SNAPBACK}>

just add an & between @comspec and " :ph34r:

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.
  :)

Link to comment
Share on other sites

  • Developers

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.
  :)

Link to comment
Share on other sites

just add an & between @comspec and "  :ph34r:

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)

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...