Getting the old path of a dropped file... is this possible?

Hi guys,

I’m thinking about building an automation with a watch folder that ultimately does the following:

A set of files residing in a directory tree can be dragged to the watch folder. Upon processing these files, the script distributes the resulting saved files back into other folders relative to that directory tree where the source files came from.

My question is, is it possible to detect the old path of an object when it’s copied or moved into the watch folder?

Thanks!

The short answer is not from an AppleScript that I’ve been able to find. Command-z in the Finder will return it (undo the move), but I don’t know where the Finder keeps that info. Of course if you move a selected file from your script, then you know where it was.

The closest I’ve seen is the droplet posted here. Would you be able to use that approach?

(A bit of an aside - I meant to try using that script in folder action form (forgot about it until now). It didn’t work, although I noticed something interesting. Move or rename the folder with that action attached, and the .DS_Store will trigger the script.

I moved Folder A -with action attached - to Folder B and got “Scratch:Folder B:Folder A:.DS_Store”. Whether that would ever be useful? Dunno.)

Also, if the dropped file had it’s old path stored as a Spotlight comment, that could be read. Maybe you could use two folder actions - one for the originating folder(s) and one for the processing folder. (The droplet idea seems simpler.)

Finally got it working via a droplet and grabbing the file path as a string. Thanks for the input guys, the solution I came up with was basically what the users in your link outlined, capitalj.

Appreciate the help!

Sheesh, capJ; I was even the original poster of that thread and had already forgotten the answer! (In my defense, I’ll admit to being a month shy of 71 – ugh, brain cells are withering fast.)