millmaine Posted September 20, 2021 Posted September 20, 2021 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?
comment Posted September 20, 2021 Posted September 20, 2021 (edited) 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, 2021 by comment
bcooney Posted September 20, 2021 Posted September 20, 2021 filewin:/$path1/Dropbox (Millmaine)/Finance/FROG_Invoices/CREATIVE/$invoice_name should be ”filewin:/“ & $path & “/Dropbox …” you need to concatenate the $vars in the path.
comment Posted September 20, 2021 Posted September 20, 2021 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.
comment Posted September 21, 2021 Posted September 21, 2021 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:
millmaine Posted September 22, 2021 Author Posted September 22, 2021 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.
bcooney Posted September 23, 2021 Posted September 23, 2021 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.
comment Posted September 23, 2021 Posted September 23, 2021 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...
millmaine Posted September 28, 2021 Author Posted September 28, 2021 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?
JMW Posted December 15, 2021 Posted December 15, 2021 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?
bcooney Posted December 16, 2021 Posted December 16, 2021 @JMW please start another thread for your issue and tell us what problem you're encountering.
Recommended Posts
This topic is 1071 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now