Need help with macro to compress and copy DB to FTP

B

Brossyg

I have a large Access DB. I want to create a macro to create a compressed
file of the DB (I would ordinarily right click in Explorer: Send to
Compressed (zipped) Folder) and then send the compressed folder to an FTP
site (with password protection). Is there a way to do it inside Access when
the DB is open?
 
D

Daniel

I could be wrong, it has happened before, but I do not believe you can
compress a database which you are currently working in.

You could easily create a scheduled task to perform this operation or
perhaps a vbscript that initiates the process as well.
 
B

Brossyg

OK...I can't compact it while open (in fact, I now realize that the Compact
command does close the DB first), but how do I initiate script (from within
Access) to compact, compress and then send to password protected FTp adress?
What is the code?

Thank you.
 
D

Daniel

I suggest tackling one issue at a time then combining the solutions.

To compact a db, take a look at
http://www.mvps.org/access/general/gen0041.htm

Then to compress the file, take a look at
http://groups.google.ca/group/micro...+vba+zip+a+file&rnum=1&hl=en#a2c1c796f957b5e2
http://groups.google.ca/group/micro...+vba+zip+a+file&rnum=4&hl=en#5241ff3358d8f528
or google the subject there's a lot of info out there!

Finally sending it to an ftp.
http://www.mvps.org/access/modules/mdl0015.htm
http://www.mvps.org/access/modules/mdl0037.htm
http://www.databasejournal.com/features/msaccess/article.php/3513061
As usual googling this subject return a lot of hit as well!
 
B

Brossyg

OK...the compacting code was easy. For zipping, since XP includes a "Send to
Compressed (zipped) Folder" option in the right-click menu, isn't there a
simpler way to use this functionality programatically rather than a WinZip
add-in?
 
D

Daniel

get a compression software (pkzip, winzip, ..., not sure about 7Zip) that
accepts command line code then use the Shell statement.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top