Jan 05
Enable write flag on Drop Box files via Folder Actions
Cats: News|
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:
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...
Leave a Reply
You must be logged in to post a comment.
Subscribe
