This won’t let me edit (or filter varible) from dynamic folder name. Any ideas would be very appreciated.
on adding folder items to this_folder after receiving these_items
tell application "Finder"
set mainFolder to get the name of this_folder
set cleanFolder to unix_path(x) --THIS IS WHAT IS NOT WORKING FOR SOME REASON
set fromFolder to "/Volumes/Untitled2/Tiki\\ Staging/External\\ Dropbox/" & taco & "/"
set toFolder to "/Volumes/TIKI_01/Tiki_Confidential/External\\ Dropbox/"
set scriptToExecute to "sudo /usr/local/helios/bin/dt mv " & fromFolder & " " & toFolder
try
do shell script "" & scriptToExecute & ""
on error errmsg number errnum
beep
display dialog ((errnum & ": " & errmsg) as string) with icon caution buttons {"OK"} default button 1
end try
end tell
end adding folder items to
on unix_path(mac_path)
set chars to every character of mac_path
repeat with i from 1 to length of chars
if " " contains (item i of chars as text) then
set item i of chars to "\\" & (item i of chars as text)
end if
end repeat
return every item of chars as string
end unix_path