Solved

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

Posted on 2006-06-15
4
475 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

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…
A look at what happened in the Verizon cloud breach.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

628 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