Sign in to follow this  
Followers 0
bobheart

Zipping files .

8 posts in this topic

I have this but it just opens the dos box and stops .

Run(@ComSpec & " /7z a -tzip archive.zip bat2\*")

They show in their help .

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.

So what do I have wrong that you can see ?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I don't think you need the slash in front of the program call. You'd only need that if you specified the /c option, in which case it would read

Rune(@ComSpec & " /c  7z.....")

Edit:You might also need to specify the full path to the program if it's not where your command interperter is located. If you're including it with FileInclude, just use @ScriptDir plus the leading backslash to the program path.

Edit2:Along the same lines, you might also have to give it a more complete path to the folders and archive you wish to use (although check with the program's manual, since I've never used this 7z app.)

Edited by pekster

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I think it might be better if I just use a bat to do it as I can get that to work just fine .

7z u archive.zip bat2\*.bat

I just have to have a copy of the 7z command line exe in the same folder as the bat file .

I found that my 7z.exe from my xp computer would not work in my windows 2000 server ? when I copyed over it with the windows 2000 server 7z.exe then it worked .

So I wouldnt be able to use the 7z.exe in someone elses computer .

edit

7z has the best compression , it's the only one I will use ..

http://www.7-zip.org/

Edited by bobheart

Share this post


Link to post
Share on other sites

Actually I made lots of tests and I have to say that sometime 7z is better and some other time .rar is better. It depends.

Share this post


Link to post
Share on other sites

Looks like about 10% from rar and 7z with 7z a little better .

Share this post


Link to post
Share on other sites

You are welcome :D

Anyway 7zip is GNU so I guess is much better than .rar that have to be payed...

Share this post


Link to post
Share on other sites

Thanks I've been looking for a command line zip

Winzip has a command line set of tools that you can install.

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Share this post


Link to post
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
Sign in to follow this  
Followers 0