|
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.
|