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


Click here to return to the '10.4: Make any folder a burn folder' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Make any folder a burn folder
Authored by: nvdingo on Sep 23, '05 02:20:50PM
OK THIS ONE WORKS!!! you have to coerce the heck out of the folders passed from get selected items
everything is identical, except for these 2 extra lines

set myfolder to myfolder as alias
set myfolder to POSIX path of myfolder
immediately after the
repeat with myfolder in myfolders
so here is the complete WORKING AS A PLUGIN for the finder code for the run
applescript piece of your workflow

on run {myfolders}
	
	set myNewPath to ""
	repeat with myfolder in myfolders
		set myfolder to myfolder as alias
		set myfolder to POSIX path of myfolder
		
		set myPath to (POSIX path of myfolder) as string
		set myPath to text items of myPath
		repeat with i from 1 to ((count of text items in myPath) - 1)
			set myNewPath to myNewPath & ((text item i of myPath) as string)
		end repeat
		
		set myDir to do shell script "dirname " & myNewPath
		set myCurrentFolder to do shell script "basename " & myNewPath & " .fpbf"
		
		do shell script "mv " & myNewPath & " " & myDir & "/" & myCurrentFolder
		
	end repeat
	return myfolders
end run
enjoy?!?!

[ Reply to This | # ]