Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2006-06-15
4
Medium Priority
?
489 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 500 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 500 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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…
In a use case, a user needs to close an opened report by simply pressing the Escape (Esc) key. This can be done by adding macro code in Report_KeyPress or Report_KeyDown event.
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…

926 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