I have temporarily been using the overly destructive method (.remove) to automatically delete files that I am one working with. However I would like to copy them to the trash THEN remove them. Here's what I put together, but it's not doing the copying, instead returning the result false:
var original = new File (app.activeDocument.path+"/"+app.activeDocument.name); var trash = new Folder ("~/.Trash"); original.copy(trash) new File(original).remove();
var trash = new Folder ("~/.Trash");
Where the syntax comes from?
Which OS do you use?
"Folder.trash" is without a dot. Under Windows Folder.trash is a virtuell database, is readonly and the result is always null.
Sorry, I guess I left out some relevant information...
I am using OS X. I know that that is the path to the trash in the Unix shell. The '~' represents my home folder and the '.' indicates that the folder is hidden. If I hop into terminal and type 'cd ~/.Trash' it takes me to my trash folder.