Solved

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

Posted on 2006-06-15
4
464 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 1

Accepted Solution

by:
orestyle1 earned 125 total points
ID: 16916069
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
ID: 16917038
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

752 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