Google Answers Logo
View Question
 
Q: computers ( No Answer,   2 Comments )
Question  
Subject: computers
Category: Computers > Programming
Asked by: australia2005-ga
List Price: $50.00
Posted: 10 May 2005 08:44 PDT
Expires: 16 May 2005 10:21 PDT
Question ID: 519988
I would like a windows xp script (.vbs for example) to take a folder
(and all subfolders and files in it) and zip it in a new folder name (
using the included
windows zip function.) Maintaining all folder & directory path info
etc.

Request for Question Clarification by studboy-ga on 10 May 2005 12:43 PDT
Hi

Have you tried a .bat file?

1) Create a file called script.bat (using notepad)
2) Put your commands in there
3) Run that file by just typing script.bat, script, or even double click on it

What commands you put in the file?
You can put anything--
some useful DOS commands:

CD (change directory)
COPY (you know what this is)
XCOPY (you know you can copy directories, recursively, with this command, right?)

Any command--example:
C:\WINDOWS\SOMETHING.EXE

And of course, ZIP.  If you just want to copy directories, just xcopy,
no need to zip.

Give it a try and let me know if it works.  If it does let me know and
I can post a formal answer.  Thanks.

Clarification of Question by australia2005-ga on 13 May 2005 08:36 PDT
As an explanation to my posting: As part of our daily backup routine,
I'm backing up a set of folders, subfolders and files to CD. I've been
using a DOS batch program: xcopy etc. and it works fine, except the
total size now exceeds the size of the CD. So I thought I could take
advantage of the XP zip function and reduce the size of the file.
However, I want to do it in "batch" mode. I thought a windows script
might be able to do this job, and as a final step, zip the entire
contents to reduce file size so it can be copied to CD. I've looked at
PK ZIP batch commands, but I was having a problem keeping subfolders
sorted out.

Request for Question Clarification by studboy-ga on 15 May 2005 00:15 PDT
Hi australia2005-ga 

I can help you get PKZIP to "sort out" the subfolders--
can you explain to me what problems you were facing when you use the
PKZIP commands?

ie

1) What commands did you use?
2) What symptoms that you see that you were not happy with?

Thanks!

Request for Question Clarification by studboy-ga on 15 May 2005 00:19 PDT
Remember that PKZIP has lots of options.
You can see all the options by doing :
PKZIP -h
There's an option to preserve directories, I believe.
Let me know, thanks.

Request for Question Clarification by studboy-ga on 15 May 2005 00:21 PDT
For example,

have you tried:

pkzip -aPr zipfile.zip directory\*.*

?

This will take care of subdirectories.

Again, let me know how it goes.  Thanks.

Clarification of Question by australia2005-ga on 16 May 2005 10:21 PDT
Thank you for your help, studboy & others. I am using the command line
7 zip ( www.7-zip.org), it sorts out directories just fine, plus it
doesn't remove window's zip function.

It has compressed 785 Meg of data to around 300. So, we are rolling again.
Answer  
There is no answer at this time.

Comments  
Subject: Re: computers
From: solentechnologies-ga on 10 May 2005 14:01 PDT
 
Do you want a visual basic program, (source included) that will zip a
file including the rest of the files in the folder?
Subject: Re: computers
From: australia2005-ga on 12 May 2005 08:50 PDT
 
As an explanation to my posting: As part of our daily backup routine,
I'm backing up a set of folders, subfolders and files to CD. I've been
using a DOS batch program: xcopy etc. and it works fine, except the
total size now exceeds the size of the CD. So I thought I could take
advantage of the XP zip function and reduce the size of the file.
However, I want to do it in "batch" mode. I thought a windows script
might be able to do this job, and as a final step, zip the entire
contents to reduce file size so it can be copied to CD. I've looked at
PK ZIP batch commands, but I was having a problem keeping subfolders
sorted out.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy