At the moment, when the file is navigated to and then selected, it will write to the text file:
Up until now that is what i needed it to do, but now i need a slight modification.
What i need is for it to just write:
- Excluding the filename.
The code that i am currently using for this, is as follows:
saveFile = File.openDialog("Select the file you are working on:", "All Formats: *.*");
var txtPath = new File("C:\\path.txt");
Hopefully this is just an easy tweak?
Any help would be much appreciated.
Looks like i've found the solution.
Here it is for future reference:
var selectedFolder = Folder.selectDialog("Select a folder");
What you are looking for is...
var selectedFolder = activeDocument.path;
The user could select any folder with your solution, and may have nothing to do with the selected file.