Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Improvement on tanvach's script + instructions' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Improvement on tanvach's script + instructions
Authored by: sjonke on May 09, '05 12:30:11PM
I really like tanvach's idea for a folder action, and I'll offer this small improvement over it, which will make the Finder refresh it's view of the touch'd file and thus update the listing immediately:
on adding folder items to this_folder after receiving these_items
    repeat with i from 1 to number of items in these_items
      set this_item to item i of these_items
      do shell script "touch \"" & POSIX path of this_item & "\""
      tell application "Finder"
        update this_item
      end tell
    end repeat
  on error error_message number error_number
    if the error_number is not -128 then
      tell application "Finder"
        display dialog error_message buttons {"Cancel"} default button 1 giving up after 120
      end tell
    end if
  end try
end adding folder items to
How to use: copy and paste the script into a new script in ScriptEditor. Save as as compiled script to the folder: /Library/Scripts/Folder Action Scripts/ Then follow the instructions to attach it to your Downloads folder. Note that I would only recommend using this if you have a dedicated downloads folder - I wouldn't, for example, attach this to your Desktop!!

--- What?

[ Reply to This | # ]

Improvement on tanvach's script + instructions
Authored by: bnmnetp on May 09, '05 06:31:52PM

You can do this really easily with Automator.
1. Create an automator action that runs a shell command
2. Click the button that says use input as arguments
3. the command to run is touch
4. Save as plug-in (for folder actions) Attach to your download folder.

[ Reply to This | # ]