|
|
Selectively shred files with an Applescript droplet
There are some areas your script could be improved. For example, in your code you have:
Rather than putting your own quotes around the posix path, you could use the Apple-supplied method: quoted form of, and end up with:
Also, I'm not sure why you used "on open of targetFiles" - "on open targetFiles" is the correct way to use "on open". Another change is that you can loop over the items in a list, without needing an iteration variable. This means you can do:
Something else to keep in mind is that the variable 'filenames' isn't really a bunch of filenames, its a bunch of file paths. Perhaps naming it filePaths would be clearer?
So, here's the script, with some modifications:
|
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:Hints1 new Hints in the last 24 hoursComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.05 seconds |
|