DTP


 
Lively discussions on the graphic arts and publishing — in print or on the web


Go Back   Desktop Publishing Forum > General Discussions > Print Production & Automation

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 02-15-2011, 10:23 AM   #1
ktinkel
Founding Sysop
 
ktinkel's Avatar
 
Join Date: Oct 2004
Location: In Connecticut, on the Housatonic River near its mouth at Long Island Sound.
Posts: 11,189
Default Automating Mac file management

I do an annoying task every day:

Each morning a log management utility downloads 4 logs (for each of two log types) and adds them to an earlier log stored on my hard drive. It looks like this when I get up each morning. (I renamed the first item in each list the day before; it was originally labeled like the second.)

Code:
access_log_20110213.gz       Feb 13, 2011 5:30 AM
access_log.2.gz              Yesterday, 5:30 AM
access_log.3.gz              Feb 13, 2011 5:30 AM
access_log.4.gz              Feb 12, 2011 5:40 AM
access_log.5.gz              Feb 11, 2011 5:40 AM
error_log_20110213.gz        Feb 13, 2011 5:30 AM
error_log.2.gz               Yesterday, 5:30 AM
error_log.3.gz               Feb 11, 2011 5:30 AM
error_log.4.gz               Feb 11, 2011 5:40 AM
error_log.5.gz               Feb 11, 2011 5:40 AM
Assuming the lists are up to date, the second item in each set is changed to show yesterday’s date, in this format:
error_log_20110214
The 1st item is placed in a folder (just above) labeled for the month:
2011-02
The 3rd, 4th, and 5th are deleted (thrown in the trash), leaving this:
Code:
access_log_20110214.gz       Yesterday, 5:30 AM
error_log_20110214.gz        Yesterday, 5:30 AM
It strikes me that this job is more suitable for a robot than a person. Does anyone know how I can automate it? I have been looking at the Mac’s Automator app, but don’t see how to do it. Or write some sort of script?

Whatever, it would have to test for the date (in case the power went out or we skipped a day for some other reason).

Appreciate any advice.

   
__________________
[SIZE=2][COLOR=LemonChiffon]::[/COLOR][/SIZE]
[SIGPIC][/SIGPIC]
ktinkel is offline   Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Content Management Systems Richard Waller Web Design 2 04-18-2009 08:42 AM
Colour Management PeterArnel Print Production & Automation 8 07-28-2006 01:20 PM
Automating text using InDesign mamartin1 Print Production & Automation 5 02-17-2006 02:40 PM
Image management Cristen Gillespie Images 1 12-30-2005 09:46 AM
automating mailto: links annc Print Production & Automation 19 12-03-2005 09:56 PM


All times are GMT -8. The time now is 10:21 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Contents copyright 2004–2014 Desktop Publishing Forum and its members.