WinZip / Task Should I do this thru VBA in Access

  • Thread starter Thread starter Andre Laplume via AccessMonster.com
  • Start date Start date
A

Andre Laplume via AccessMonster.com

I want to compress and back up all my Access dbs overnight. I can do this
interactively using WinZip. I want to schedule it overnight and thought I
could use XP's 'Task Scheduler' but could not figure out it it was possible
to make it execute a single command. (Is it even possible?)

Would / Should I / Could I (?) try to set up an Access Db that contains a
single macro that executes Winzip on the particular folder where the dbs
are? I would think there should be a way to invoke WinZip from within the
VBA but it sounds like I may be running in circles...and using Access to
accomplish something better done elsewhere?

What would be the reccomended path? Sorry for a question that most of you
already know the answer too, I am a little new at using these tools!
 
The task scheduler will do what you want but be careful it runs under the
system account by default, cannot talk to the network, you will have to
change it's start-up permissions for it to do what you want.

WinZip is based on some opensource code called Info-Zip

http://vbaccelerator.com (example code)

http://www.cdrcom.com/pubs/infozip/ (main site)

personally I would use these rather than WinZip, they work perfectly, I have
a vb6 program that I am in the middle of that gets all my programming
projects, zip's them up to a new zip file, if you want the source you are
more than welcome, but it is in vb6 not vba, could be converted quite
simply.
 
thanks, I use Task Scheduler now to execute a few maint items on the
network. My approach has been to to simply have it open a MsAccess db. I
set the db to execute a macro on open. This works great. The nature of
these currently scheduled processes is to query, report and xfer a file so
it makes sense to do it in MsAccess. For the case of just zipping files I
could take the same approach, open a db, have it set to execute a macro on
open that invokes WinZip etc etc...but it feels like I am using MsAccess
for an unintended purpose.

It sounds like I could create a script that invokes WinZip, or set a
command line right up in Task Scheduler. This is where I am confused. When
I invoke Task Schedule, I see no where to simply input the comman line but
rather it looks for an app to start up. Would you know how to do this?
Perhaps I need to post this as a topic somewhere?

I am sure the other products you mention would work better but I am limited
to using 'approved software' so.....

THANKS!!!
 
Create a batch file with the command line that you want personally I create
a c:\batch folder where I have all my .bat .cmd .vbs, then in the task
scheduler call the batch file.
 
I figured out how to get it to execute a single Command..ie invkove Winzip
and zip the files. Still I'd like to to execute a script. That way I can
add some error handling to the process. Any ideas how to get Task
Scheduler to do so, please post.
 
Again, thanks...I am onto to something this morning....I think I'll be ok!
 
Thanks to all. I think I have what I need for now... a few simple lines of
code in a simple batch file:

start wzzip -u "G:\MySpace\MyZip" "G:\DbArea\*.*"
If Not ErrorLevel 1 Goto Exit
Echo ********WARNING ENCOUNTERED********
:Exit


I need to spiffy up the Error checking but it works. The only trouble I
have is getting it to write to a CD. It writes to any drive letter except
that of my CDRW drive....not sure why....
 
Back
Top