Cut-Paste service from Automator [end]

Last time I change logic Cut-Paste, I’m still using shell script to do the work. Now I’m purely using Applescript to do all things.

Cut Service

on run {input, parameters} tell application "Finder" set LF to character id 10 set theSelection to the selection set the clipboard to "" repeat with oneItem in theSelection set pathItem to POSIX path of (oneItem as string) if (the clipboard) is "" then set the clipboard to pathItem else set the clipboard to (the clipboard) & LF & pathItem end if end repeat end tell return input

end run

Move Service

on run {input, parameters} tell application "Finder" set pathItem to POSIX path of (the folder of the front window as text) end tell set paths to paragraphs of (the clipboard as text) repeat with oneItem in paths set oneItem to POSIX file oneItem tell application "Finder" to move oneItem to POSIX file pathItem

form of pathItem end repeat return input end run

With this even if we make a mistake on moving items we can undo it by calling Finder Undo function (cmd + z)

Thanks for the visit! If you have any feature that wished me to make (as long as it possible), contact me!.