And how will the user choose the location to which the file will be exported?
Unfortunately, you can't just pop up a file save dialog with the file name already entered as the filename.
You could do one of the following without resorting to a plug in (one might offer the dialog option):
You can set up a table of permitted locations for saving the file. The user clicks an option to select it and your file exports to that location.
An open file dialog appears (not save) and the user selects a file (any file) from within that folder. The script uses the path to the selected file to compute the file path to the folder to use in the $Path variable. The funky part about this is that there must be at least one file already in the folder and the file that opens is actually used to insert the selected file into a container field in order to gain access to the needed file path.
Currently it's hard wired as you could see to the desktop. I was just going to use a custom dialogue. They would like the ability to direct where the file is saved. The save as PDF file that is exported is huge and is so large that a special service uploads it to a corporate site across he country. Currently she has to save this huge file to her desktop and then copy it to another destination and then delete it from her desktop. Apparently the location can vary. I suppose there could be multiple choices. Maybe 1 Desktop, 2 Folder A, 3 Folder B.
I don't feel quite so foolish for not being able to resolve this one easily. The person who created the current script had brushed off the request for the change as being more trouble than it's worth.
I'd say so perhaps myself, but there are a number of places in our tools where an option would be really a time saver.