WhatTheyThink Acquires PrepressForums.com, Releases New Version of PrintPlanet

This site is a static archive, you are free to search, and view but no new posts or registrations are allowed.

Please visit printplanet.com for the new discussion groups

Prepress Forums  

Go Back   Prepress Forums
Googlemap ME Members List Calendar Search Today's Posts Mark Forums Read

» Site Navigation
 > FAQ
» Skyscraper

View Single Post
  #4 (permalink)  
Old 05-08-2006, 11:26 PM
MarkDouma's Avatar
MarkDouma MarkDouma is offline
Member
 
Join Date: Oct 2004
Location: Grand Rapids, Michigan, USA
Posts: 92
Send a message via AIM to MarkDouma
You'll most likely want to use "Folder Actions" and AppleScript. Basically, you attach an Applescript to a folder, and then any files that are added to that folder (only the folder itself, not any folders which might be inside of it) can be manipulated by the script.

Open Script Editor (in /Applications/Applescript/) and paste in the script below:


property destinationFolder : missing value

on adding folder items to thisFolder after receiving theseItems
?????if destinationFolder = missing value then
??????????set destinationFolder to (choose folder with prompt "Choose the folder you want to move the files to:")
?????end if
?????try
??????????repeat with i from 1 to (count of theseItems)
???????????????set thisItem to item i of theseItems
???????????????tell application "Finder"
????????????????????move thisItem to destinationFolder
???????????????end tell
??????????end repeat
?????on error errorMessage number errorNumber
??????????display dialog errorMessage & return & return & errorNumber
?????end try
end adding folder items to

Choose File > Save and save it as a .scpt into /Library/Scripts/Folder Action Scripts/. Then find the folder you want to "watch", Control-click on it in the Finder and choose Attach a Folder Action.... In the dialog, choose to attach the script you just saved. Add a file to the folder and you'll be prompted (by the script) to choose the destination folder. Then whenever files are added to this watched folder, they'll be moved to the destination folder automatically.

This is a really basic script and could easily be customized to do whatever you'd like.

Hope this helps....

P.S. The actual application that handles this is "System Events" (in the /System/Library/CoreServices/ folder). You may notice it's added automatically to your login items, so don't let it alarm you.
Reply With Quote
 

All times are GMT -8. The time now is 07:48 PM.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Powered by vBadvanced CMPS v3.0 RC1