Using the method app.activeDocument.path; returns a path string that looks like this: /c/Temp/Test if the file is stored at C:\Temp\Test\FileNameHere.Format, or alternatively; if a folder name has a space it would looke like /c/Temp/Test%20Folder if stored in C:\Temp\Test Folder\FileNameHere.Format What I'm looking for is a way to extract the name of the last folder automatically regardless of what it is (in this case "Test" or "Test Folder") and store it to a variable for later use. Any ideas on how to do this? Thanks for any help!
var pathname = decodeURI(app.activeDocument.path.name);
Wow, so simple... I like it! Thanks Paul!