Copy link to clipboard
Copied
I have a script that I am running through a hot folder and when it is finished I would like to delete the file from it's folder. I have tried a few different things but to no avail I can not get it to work. Any suggestions? Or can this be done?
GOT IT. Thanks V. File should have been a variable.
var file = (File("Users/mycomputer/Desktop/Hot Folder/Layout.pdf"));
file.remove();
Copy link to clipboard
Copied
have you tried File.remove() ?
Copy link to clipboard
Copied
Here is what I was trying but get a File.remove is not a function.
var docname = activeDocument.name;
var layoutDoc = (File("/Users/mycomputer/Desktop/" + docname));
File.remove(layoutDoc);
Copy link to clipboard
Copied
GOT IT. Thanks V. File should have been a variable.
var file = (File("Users/mycomputer/Desktop/Hot Folder/Layout.pdf"));
file.remove();
Copy link to clipboard
Copied
Would you care to share how you set-up a hot folder... PC/MAC...??? Wanting to do the same thing...
Thanks
Copy link to clipboard
Copied
Use Automator folder action . You will have to learn some basic apple script but not to complicated.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now