Solved

How to schedule a job that compresses files by modify or access time using GZIP

Posted on 2006-06-15
4
401 Views
Last Modified: 2010-04-13
Once a month I go into my file server and run GZIP to compress files that are older than one month. I would like to know how to write a batch file that will compress by modify date or access time. Any help would be much appriciated.

Thansk
0
Comment
Question by:AAMNetop
4 Comments
 
LVL 1

Accepted Solution

by:
orestyle1 earned 125 total points
Comment Utility
We are using PKZIP from the command line.  Seems to work best when running batch files as you can pass paramaters to pkzip from the batch.  I would assume you could specify the greater than less then option within the batch file to get this done.  I would get PKZIP and go through the documentation.  

http://www.pkware.com/business_and_developers/compression/dos/  

This is the link to their site.  I must say that unzipping and zipping files in a batch file was the easiest when using pkzip as you can specify different commands right in the command.  I am not really sure how to specify the date range, but this should get you in the right direction.  
0
 
LVL 7

Assisted Solution

by:life_j
life_j earned 125 total points
Comment Utility
You can create  a log file of the modified dates on a folder
Say you have a root folder by name Backup
then

c:\backup\dir > modifieddate.log

This would give a list of all the files and folders which have been modified.
You can use a for loop to check if the file or folder is older then a month and zip the file.

As per scripting. I would ask you to put a pointer in the programming.Who would be able to implement this idea.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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: Create your first Windows Virtual Machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, the Windows OS we will install is Windows Server 2016.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

762 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

12 Experts available now in Live!

Get 1:1 Help Now