Automating Windows Compression

DALIEN51

Registered User.
Local time
Today, 08:35
Joined
Feb 26, 2004
Messages
77
I have a MS Access 2000 application which, using code, every night, creates a folder on a external drive named with todays date (ie Christmas Day 20071225) and copies various files into it.

What I want to be able to do is then use Windows Compression to compact the files into a single Windows Zip file named identically to the folder name (ie 20071225.zip) and delete the files ive just compacted leaving the zip file alone in the folder.

Can this process be automated? At present I perform the compression manually. Would I need to use a Shell command to control the file naming?

Any help most appreciated.

Dalien51
 
Dalien51,

You'd have to use ShellAndWait (Search here).

I have done this with PkZIP software. I know this topic has been covered
here before.

Post back if you need more references.

Wayne
 
Code:
 Shell "C:\Program Files\WinZip\WINZIP32.EXE -a " & strZipFile & " " & strFileName


The above should do the trick. The file paths and names can not contain spaces, if they do you will receive an error.

strZipFile=Name and path of the new zip file

strFileName=Name and path of file to compress
 

Users who are viewing this thread

Back
Top Bottom