September 20, 20214 yr I have a script where I want to export a csv file and I would like it to work on both mac and windows. At the moment it works fine on macs but is not working on Windows. I have a script step to create a variable $path1 Substitute ( Get (DesktopPath) ; "Desktop/" ; "" ) Then in Export Records script step in "Specify Output File" I have: filewin:/$path1/Dropbox (Millmaine)/Finance/FROG_Invoices/CREATIVE/$invoice_name filemac:/$path1/Dropbox (Millmaine)/Finance/FROG_Invoices/CREATIVE/$invoice_name I have checked with our operatives and the directory sequence after $path1/ is consistent (i.e. nobody has any additional folders/directories). Our DB is hosted on Filemaker Cloud. Any idea why it's not be working for those on Windows?
September 20, 20214 yr 1 hour ago, millmaine said: is not working on Windows "is not working" is not a good description of a problem. How exactly does it fail? Is there an error message or an error number you can capture? Edited September 20, 20214 yr by comment
September 20, 20214 yr filewin:/$path1/Dropbox (Millmaine)/Finance/FROG_Invoices/CREATIVE/$invoice_name should be ”filewin:/“ & $path & “/Dropbox …” you need to concatenate the $vars in the path.
September 20, 20214 yr 2 hours ago, bcooney said: you need to concatenate the $vars in the path No, not if you are specifying a path. You only need to do that if you're creating a string that will eventually be used as path.
September 21, 20214 yr 6 hours ago, bcooney said: Isn’t that the case? If it were, how could this be possible: On 9/20/2021 at 8:18 AM, millmaine said: At the moment it works fine on macs Also, OP said clearly: On 9/20/2021 at 8:18 AM, millmaine said: Then in Export Records script step in "Specify Output File" I have:
September 22, 20214 yr Author My two favourite experts at odds!! The problem manifests itself by no file being exported when Windows machine is being used. I will add some error capture alerts to the script. An added difficulty is being 1000km away from the operator and not having a Windows computer myself.
September 23, 20214 yr It’s a rare thing when I disagree with Comment, but my interpretation is that the $path is not valid. Why it works on Mac may be a consequence if some saved setting. Also, I typically construct the full path in a $path and that is all that is entered in the output dialog. Then, you can show us that path in data viewer.
September 23, 20214 yr 20 minutes ago, bcooney said: my interpretation is that the $path is not valid. It may not be a valid path - but not because of the reason you gave, but simply because the target folder does not exist in the specified location. Another cause of failure could be lack of privileges for the target folder. It's sure going to be fun finding out which one is it from 1,000 km away...
September 28, 20214 yr Author I had already checked that the path was valid. Got the user to run a script that retuned the file path. All as it should be. On the windows computer we have run a FMP export script with error-logging on which results in an 800 error — "Unable to create file on disk." The user gets the following alert from Filemaker: "WC2282021-C-63768442785.csv" could not be created on this disk. Use a different name, make more room on the disk, unlock it or use a different disk." That seems to indicate that FMP doesn't know what's causing the error — only that it can't create the file. The user has asked whether McAfee antivirus might have some bearing on it. What do you think?
December 15, 20214 yr On 9/28/2021 at 12:41 AM, millmaine said: The user gets the following alert from Filemaker: "WC2282021-C-63768442785.csv" could not be created on this disk. Use a different name, make more room on the disk, unlock it or use a different disk." That seems to indicate that FMP doesn't know what's causing the error — only that it can't create the file. Did you get this problem solved? Could you post the path you are using when you try and save the file?
December 16, 20214 yr @JMW please start another thread for your issue and tell us what problem you're encountering.
Create an account or sign in to comment