Solved

How to create a batch file or script to automatically zip certain files

Posted on 2009-04-15
4
610 Views
Last Modified: 2013-11-10
I'm not sure if this is at all possible but I figured I'd ask.  Is there any way to create a batch file or a script that runs and will automatically zip and compress certain files so they can be backed up?  We use lotus notes here and the archive files can often get over 4GB.  We have a backup process but it uses robocopy to backup and the destination is in FAT and won't allow file sizes over 4GB (it's a long story why it has to be setup as FAT, NTFS just won't work becuase of the setup).  So, I'd like to create a script that will zip the files and backup the zipped files so there is a backup copy available.
0
Comment
Question by:maianoel
  • 2
  • 2
4 Comments
 
LVL 38

Expert Comment

by:Shift-3
ID: 24148709
It is possible to zip files using native vbscript, but for better compression you should use 7-Zip in a batch script.  See here for examples.
0
 

Author Comment

by:maianoel
ID: 24150197
OK, so I've been working on this but I keep getting an error.  When I run the batch file as the instructions show it keeps telling me "7z.exe is not recongized as an internal or external command, operable program or batch file."  I installed 7-Zip so it should be working...  Any ideas?
0
 
LVL 38

Accepted Solution

by:
Shift-3 earned 500 total points
ID: 24150247
Include the full path of the executable, e.g. "%programfiles%\7-Zip\7z.exe".
0
 

Author Closing Comment

by:maianoel
ID: 31570461
That worked perfectly.  Thanks!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now