A quick guide would be to create a one-line script, with Show Custom Dialogue, and set the contents to be Get ( DesktopPath ). Run it and you will see the format that that function returns. (It ends "...Desktop/" ) You should be able to finish the pathname by adding /Invoices/, and then the file name. Don't forget to add the pdf file extension.
Hello Sorbuster, I did what you suggested but I got the following Message
Thi is what I wrote
"Arch5" is the folder where I want to save the pdf file
Filemaker's error message are not very helpful in this scrpt step. Here's how I would debug it (allow me to assume a Windows platform):
- open the folder you want in Explorer, and copy the address
- hard code that address into your script step, with a hard-coded "/TestFile.pdf" on the end
- prove that that works first
- debug (either before you get that to work, or after) by using the custom dialogue I suggested, replacing it with the full pathname or path name you progressively build up as you substitute each component part of the path with 'code'.
- you can then spot how your coded pathname differs from the working pathname
- I find that in this script step FM is happy with either forward or back slash
I find the error message is usually a bit mis-directing - the fault has always been one of a simple syntax error. (Maybe once it has been that the user genuinely didn't have access privileges to write that file to that disc.)
I think it needs to be & Get (DesktopPath) & "/Arch5/$filename"
after your "filemac:" and "filewin:"
In your script there are some missing and out of place quotes
You can also greatly simplify your calculation if you replace "filemac" and "filewin" with just "file". That gives you a single expression for the file path that works on both platforms.