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


Click here to return to the 'Permanently delete files via AppleScript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Permanently delete files via AppleScript
Authored by: V.K. on Dec 05, '07 04:47:30PM

here is a variation of the above to delete all files in a folder.
Make an automator action consisting of the following simple shell script:

for f in "$@"
do
rm "$f"/*
done



Save the automator action as a finder plug-in and there you have it.
Right-clicking on a folder and choosing your plug-in from the contextual menu will delete all the files in that folder. As Rob says be careful using this!



[ Reply to This | # ]