473,881 Members | 1,765 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Zip mdb using Batch File

I'm hoping someone will be able to assist with this one. Using a scheduling
program I'd like to run a batch file that runs a macro to creat e a copy of
the opened database. Then, using batch again, Zip that copied file to the
same directory location and delete the copied file.

The ultimate goal here is to create small sized back ups of the original
database. I have the first part (creating the copy mdb) working great. It's
zipping that copy that's giving me issues.

Any thoughts or suggestions is much appreciated!

Thanks
Jun 16 '06 #1
5 6458
You will need a DOS based (command line) zip utility. Once you have that,
use the command line recommended by the maker of the utility. If you have
WinZip, they have a free command line add-on. There are others.

--
Wayne Morgan
MS Access MVP
"benyod79" <u23098@uwe> wrote in message news:61dd747206 000@uwe...
I'm hoping someone will be able to assist with this one. Using a
scheduling
program I'd like to run a batch file that runs a macro to creat e a copy
of
the opened database. Then, using batch again, Zip that copied file to the
same directory location and delete the copied file.

The ultimate goal here is to create small sized back ups of the original
database. I have the first part (creating the copy mdb) working great.
It's
zipping that copy that's giving me issues.

Any thoughts or suggestions is much appreciated!

Thanks

Jun 16 '06 #2
http://www.info-zip.org/

Free command zip utility. Use it all the time to do exactly what your
looking to do except I do it in vbscript.

Wayne Morgan wrote:
You will need a DOS based (command line) zip utility. Once you have that,
use the command line recommended by the maker of the utility. If you have
WinZip, they have a free command line add-on. There are others.

--
Wayne Morgan
MS Access MVP
"benyod79" <u23098@uwe> wrote in message news:61dd747206 000@uwe...
I'm hoping someone will be able to assist with this one. Using a
scheduling
program I'd like to run a batch file that runs a macro to creat e a copy
of
the opened database. Then, using batch again, Zip that copied file to the
same directory location and delete the copied file.

The ultimate goal here is to create small sized back ups of the original
database. I have the first part (creating the copy mdb) working great.
It's
zipping that copy that's giving me issues.

Any thoughts or suggestions is much appreciated!

Thanks


Jun 17 '06 #3
Thank you both for your replies. Being somewhat new at DOS, the command line
utility's link was a bit overwhelming and I couldn't figure out what to
download. So after a few valliant, but unfruiful attempts, I chose to look at
WinRar's command line downloads (my zipping program). I'm still not getting
the results I'm looking for. The batch file I created is returning an error.
Here's exactly what I have so far all on one line:

"C:\Program Files\WinRAR\Wi nRaR.exe" "C:\Documen ts and Settings\Owner\ My
Documents\Open Projects\Human Resources\DB Backup\Backup_o f_HR_06-16.mdb" "C:\
Documents and Settings\Owner\ My Documents\Open Projects\Human Resources\DB
Backup\Backup_o f_HR_06-16.rar"

I'm getting this error message: No files selected. You need to select files
for this operation.

Any thoughts on this? Should I scrap the idea using WinRar and just use a
Windows Zipping utility?

Thanks for the help.

us****@yahoo.co m wrote:
http://www.info-zip.org/

Free command zip utility. Use it all the time to do exactly what your
looking to do except I do it in vbscript.
You will need a DOS based (command line) zip utility. Once you have that,
use the command line recommended by the maker of the utility. If you have

[quoted text clipped - 19 lines]
>
> Thanks


--
Message posted via AccessMonster.c om
http://www.accessmonster.com/Uwe/For...ccess/200606/1
Jun 19 '06 #4
I looked at the WinRar help file to get the correct command line, try:

"C:\Program Files\WinRAR\Wi nRaR.exe" a "C:\Documen ts and Settings\Owner\ My
Documents\Open Projects\Human Resources\DB Backup\Backup_o f_HR_06-16.rar"
"C:\Documen ts and Settings\Owner\ My Documents\Open Projects\Human
Resources\DB Backup\Backup_o f_HR_06-16.mdb"

--
Wayne Morgan
MS Access MVP
"benyod79 via AccessMonster.c om" <u23098@uwe> wrote in message
news:6206d88bd8 4eb@uwe...
Thank you both for your replies. Being somewhat new at DOS, the command
line
utility's link was a bit overwhelming and I couldn't figure out what to
download. So after a few valliant, but unfruiful attempts, I chose to look
at
WinRar's command line downloads (my zipping program). I'm still not
getting
the results I'm looking for. The batch file I created is returning an
error.
Here's exactly what I have so far all on one line:

"C:\Program Files\WinRAR\Wi nRaR.exe" "C:\Documen ts and Settings\Owner\ My
Documents\Open Projects\Human Resources\DB Backup\Backup_o f_HR_06-16.mdb"
"C:\
Documents and Settings\Owner\ My Documents\Open Projects\Human Resources\DB
Backup\Backup_o f_HR_06-16.rar"

I'm getting this error message: No files selected. You need to select
files
for this operation.

Any thoughts on this? Should I scrap the idea using WinRar and just use a
Windows Zipping utility?

Thanks for the help.

us****@yahoo.co m wrote:
http://www.info-zip.org/

Free command zip utility. Use it all the time to do exactly what your
looking to do except I do it in vbscript.
You will need a DOS based (command line) zip utility. Once you have
that,
use the command line recommended by the maker of the utility. If you
have

[quoted text clipped - 19 lines]
>
> Thanks


--
Message posted via AccessMonster.c om
http://www.accessmonster.com/Uwe/For...ccess/200606/1

Jun 20 '06 #5
Thank you so much. That works beautifully. I'll try to follow your lead to
complete the rest of the code.


Wayne Morgan wrote:
I looked at the WinRar help file to get the correct command line, try:

"C:\Program Files\WinRAR\Wi nRaR.exe" a "C:\Documen ts and Settings\Owner\ My
Documents\Op en Projects\Human Resources\DB Backup\Backup_o f_HR_06-16.rar"
"C:\Document s and Settings\Owner\ My Documents\Open Projects\Human
Resources\DB Backup\Backup_o f_HR_06-16.mdb"
Thank you both for your replies. Being somewhat new at DOS, the command
line

[quoted text clipped - 34 lines]
>
> Thanks


--
Message posted via AccessMonster.c om
http://www.accessmonster.com/Uwe/For...ccess/200606/1
Jun 20 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
3564
by: Mark C. | last post by:
I'm trying to call a batch file that I've built using the FileSystemObject and CreateObject("Wscript.Shell"), oShell.Run... in an asp script. Naturally, I can get the script to work from a command line but not from a browser. The page does not throw an error but the oShell.Run... portion of the script doesn't run. Any help would be appreciated. Thanks.
4
47563
by: Bill | last post by:
I need help closing a CMD window when it is executed from Access. 1) The batch file is called from Access. 2) Access closes, 3) the batch runs a copy of the access database (creating a backup) 4) Once the copy is complete, the batch file opens the Access database again 5) EXIT should close out the cmd window but it does not execute that line
5
8362
by: Mark | last post by:
Hi all, I am trying to execute a batch file to copy over files from one server to another. The batch file is using robocopy to copy over the files. ============ private void CopyFiles() {// Use the process name space to copy over the files System.Diagnostics.Process oProc = new System.Diagnostics.Process(); oProc.StartInfo.FileName ="c:\CopyFiles.bat" ; oProc.Start();
1
5797
by: Bucky Pollard | last post by:
I have a web service that needs to create a batch file and call it (since there are no APIs for the functionality I am looking for). I am using the Process and ProcessStartInfo objects. When I try to call the batch file, it just returns with a return code of 1. When I call cmd.exe, and pass the batch file as a parameter it hangs. After much frustration and aggrevation, I found that CMD IS in fact running, but it is running under the context...
3
1690
by: Micus | last post by:
Greetings, I need to execute 2 applications from an application or batch file. The first app launched has the user enter a product key and the app's exit code will be 0 (failed) or 1 (succeeded). Based on the exit code of the first app, the second app will be run. My problems : Using a batch file to launch the applications produces an
2
1662
by: Stephen | last post by:
Hi all, I want to create an app that runs a batch file which inturn runs applications. question: if I start the batch file from app1, how can app1 know that the batch file ran successfully and there was no errors.. (is there a return type) we run a lot of sql jobs using batch files, so we want to create a user interface to run batch files
1
4037
by: DropIn | last post by:
Sheesh! I was doing research on using batch files as drop targets when I came across a python discussion thread on this site with the same topic. I thought I would share what I had learned (the hard way), but I could find no way to reply to that thread (even after registering!). Anyway, wrapping the python script in a batch file is a good idea, but I believe the problem the python programmer was encountering was how Windows automatically...
0
1583
by: -pb- | last post by:
Hi, I have developed a web site for my client on .net 2.0 framework using asp.net 2.0. This web site will be hosted on Windows 2003 server. Web application runs the batch file on the user button click. This batch file runs isql, isqlw or bcp utility of sql server to pull the data from database. This command generates the .csv file by executing the query.
0
1106
by: prateekbaxi | last post by:
Hi, I developed a web site for my client on .net 2.0 framework using asp.net 2.0. This web site will be hosted on Windows 2003 server. Web application runs the batch file on the user button click. This batch file runs isql, isqlw or bcp utility of sql server to pull the data from database. This command generates the .csv file by executing the query. Initially this web app was hosted on Windows 2000/XP server and it worked fine. It had...
14
12841
by: =?Utf-8?B?R2lkaQ==?= | last post by:
Hi, In my windows applicationm, i need to excute a batch file. this batch file throws some text and questions to the screen, i need to catch the standard Output, check if it's a question, in case it's a question, i want to popup a messageBox or something, and bring back to the batch file the result (Yes\No question). I know how to excute the batch file and get all the Standard output at the end, but i don't know who can i read it line by...
0
10720
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10819
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10403
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9555
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7953
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7113
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5781
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5978
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3225
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.