Generally, when files are dropped in your ~/Public/Drop Box you can only read them. You have to save a copy if you edit it. I wanted a script that would enable writing and that moved them to your desktop. So I wrote a Folder Action that let me do both things. If I could not enable them because of limitations, I want a sudo (SuperUser Do) to be used.

Here is my AppleScript to do this:
on adding folder items to thisFolder after receiving theseItems -- create list of files & folders
  try -- in case you can't due to limitations
    repeat with thisItem in theseItems -- take a file to repeat with
      set thisPath to quoted form of POSIX path of thisItem -- puts the shell path in quotes for ease of use
      set thisCommand to "chmod u+w " & thisPath -- the command
      do shell script thisCommand...

Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon


[Read more...]

Leave a Reply

You must be logged in to post a comment.