Delete from network drive using Automator

I have a workflow that I use to synchronize photos between two users' iPhoto libraries using a NAS as the synchronization point. Once I have downloaded the pictures off of the NAS to a given account, I want to be able to delete them. The NAS is set up as a Network drive on my MBP, and downloading the photos into iPhoto works without a hitch. But when the workflow comes to the Move the finder items to the trash, it fails. I am guessing this is due to the fact that it is a remote server? It works fine to delete files locally using Automator.


Any ideas?

Mac mini, Mac OS X (10.7.2)

Posted on Jul 11, 2012 12:12 AM

Reply
3 replies

Jul 11, 2012 12:22 PM in response to ArthurGaudio

Some more research has shown me that I can use an Applescript in my automator workflow, and I should be able to delete the files remotely using that. Somthing like this?


tell application "Finder"

delete files of folder XXX of drive YYY

end tell


XXX is somethig like "Public/Pictures/Transfer"


and YYY is a mounted LaCie-d2. At least I think it is mounted. I connected to it using Go to server in Finder, and it shows up in my left menu in finder.


Anyway, the Applescript module in Automator does not like the bit after drive. Saying everything after " is not expected. I tried disk instead of drive but that didn't work either. How do I reference these folders on the remote disk?

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Delete from network drive using Automator

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.