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, 09:23 AM   #1
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.)

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:
The 1st item is placed in a folder (just above) labeled for the month:
The 3rd, 4th, and 5th are deleted (thrown in the trash), leaving this:
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.

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 07:42 AM
Colour Management PeterArnel Print Production & Automation 8 07-28-2006 12:20 PM
Automating text using InDesign mamartin1 Print Production & Automation 5 02-17-2006 01:40 PM
Image management Cristen Gillespie Images 1 12-30-2005 08:46 AM
automating mailto: links annc Print Production & Automation 19 12-03-2005 08:56 PM

All times are GMT -8. The time now is 03:37 AM.

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