|
|
10.4: Make any folder a burn folder
I took the Applescript code being offered here and made a few tweaks. The changes I made were:
1) Bypass awk pipe and unecessary shell script commands 2) allow batch conversions of folders (items not folders will be ignored) 3) streamlined handler so that it will reverse burn folders if set already, and create them otherwise. Please test this on non-important directories before assuming tell application "Finder"
set userSelection to selection
repeat with thisItem in userSelection
if class of thisItem is not folder then set userSelection to rest of userSelection
end repeat
if userSelection is not {} then my toggleState(userSelection)
end tell
on toggleState(aList)
tell application "Finder"
repeat with aFld in aList
if name extension of aFld is not "fpbf" then -- normal folder
set src to items 1 thru -2 of (text items of (POSIX path of (aFld as string))) as string
set newSrc to src & ".fpbf"
else if name extension of aFld is "fpbf" then -- revert
set src to items 1 thru -2 of (text items of (POSIX path of (aFld as string))) as string
set newSrc to items 1 thru -6 of src as string
end if
try
do shell script "/bin/mv" & space & quoted form of (src) & space & quoted form of (newSrc)
end try
end repeat
end tell
end toggleState
|
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments 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.14 seconds |
|