Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

RLRL

macrumors member
Original poster
Jan 31, 2015
71
6
I built an automator Folder Action that when moving files into a desk top folder copies them to my USB Drive.

It works.

I then added at the end of this Folder Action, Get Specified Finder Items, and then, Move Finder Items to the Trash.

I wanted to delete the files off the desktop folder, but keep them on the USB drive.

However, this not only deletes the file off the desktop folder, but also off the USB drive.

Why???????
 
I don't know, maybe because it sticks to a previous command?
Reminds me that there might be rsync or rsync -a or rsync -e (can't remember which is the correct one)
Or you may also try to create a new workflow + check step options if you build it step-by-step
 
Thanks for responding. So i built the workflow, the last two steps "get finder item",where I select the files from the folder I want to delete, and then "Move Finder items to trash". I keep open the windows for the desktop folder and the USB drive folder. When running the workflow, I see the file moved to the USB drive, and then the workflow deletes the file off both Folders????

I would think this file would only get sent to the trash from the desktop folder, the one I selected.

I did not select the file from the USB drive, so why was it also sent to the trash.
 
You can use AppleScript

Code:
on run {input, parameters}
    tell application "Finder"
        repeat with i from 1 to the count of input
            duplicate file (item i of input) to folder "USB_Disk:"
        end repeat
        repeat with i from 1 to the count of input
            move file (item i of input) to trash
        end repeat
    end tell
end run

toDelete.jpg
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.