11 Replies Latest reply on Mar 18, 2013 9:13 AM by Paper_Queen

    Path to Desktop works on one computer, but not another

    Paper_Queen

      Title

      Path to Desktop works on one computer, but not another

      Post

           I'm a complete newbie at scripts, so please be gentle. heart

           Someone else built a FM database for me, including a script that exports to a specific folder called "iOSExport" on my desktop. The export works on an old MacBook Pro (the computer in use at the time the database was built, running OS 1.6.8), but fails on the MacBook Air (replacement computer, running OS 10.7.5). After digging around in the forums, the script looks correct...which is baffling.

      File being exported: ios_export (no file type tag at the end...is a spreadsheet that opens in Excel)

      Target folder on the desktop: iOSExport (always there...it never goes away)

           Currently, the line that appears to be key reads as follows:

      Set Variable [$path; Value:Get ( DesktopPath ) & "ios_export" & "/iOSExport"]

      Resulting error message: "iOSExport" could not be created on this disk. Use a different name, make more room on the disk, unlock it or use a different disk.

           What I've tried (using a copy of the FM original, to avoid messing something up):

             
      •           - Reversing the order of file and folder
      •      
      •           - Moving the slash from before the folder name to the end of the folder name
      •      
      •           - Removing the spaces before and after DesktopPath
      •      
      •           - Confirming I have full privileges in FM (I do)
      •      
      •           - Confirming the target folder allows Read and Write privileges for all users (it does)

            

           There's more than 100Gb open on the disk (typical exports are 50-75k in size), so that can't be the problem.

           Color me stumped.

           I'd love to have the person who built this figure it out, but the work was done pro bono a couple of years ago, and his boss has pretty much put the kabash on additional assistance. 

           Help.....

           (Thanks in advance for your wisdom and assistance!)

            

        • 1. Re: Path to Desktop works on one computer, but not another
          RickWhitelaw

               You're not setting the $path variable properly. Rather than explaining and maybe making a mistake, I suggest you select a file in the folder on the desktop and enable viewing of the path in the finder and you'll see what I mean.

          • 2. Re: Path to Desktop works on one computer, but not another
            Paper_Queen

                  

                 Hi Rick,

                 I began messing around while waiting for a response, then noticed the folder on the MBA was mistakenly named "iOSExport." When I changed it to "iOS_export" the export worked.

                 Which is good...except....

                 There's one other export that appears to be stuck in the desktop path too---sadly, changing the name of the folder or caps/lower case had no impact. Instead of exporting one spreadsheet, this script exports 62 HTML pages (representing US states, DC, plus Canadian provinces), each file is named with its state or province abbreviation (ex: KY.html). 

                 Here's the script the original author wrote:

            Set Variable [$file; Value:Get ( DesktopPath ) & "350HTML" & "/" & $abbreviations & ".html"]

                 Here's what is set up on my MBA:

            Folder on desktop: 350HTML (have also tried 350html, but no difference)

                 Same error message as on the iOS export...62 times, one for each un-exported .html page.

                 Following your suggestion about the correct path, here's what appears in Finder:
                  
            ~ / Desktop / 350html / {the placeholder document used to locate file path}
                  
                 As I mentioned earlier, the script was written by someone else doing pro bono work, so please hang in there with me while I try to understand all this stuff. (Thanks!)
            • 4. Re: Path to Desktop works on one computer, but not another
              Paper_Queen

              DavidAnders:

                   Thanks for responding, and please don't think me a dolt, but what part of the script is it I need to change? I swam through the links you shared, but am even more confused now, since the path---as originally written---successfully exported the .html files to a corresponding folder on the old MBP desktop.

                   I understand the desktop file paths will be different between two computers, but can't spot which part of the script addresses that...?

              • 5. Re: Path to Desktop works on one computer, but not another
                Paper_Queen

                     P.S. Since I *think* this is what you're asking for, DavidAnders, the full path would be:

                     [My HD name] / Users / [my user name] / Desktop / 350html

                      

                • 6. Re: Path to Desktop works on one computer, but not another
                  hbrendel

                       "XXXXX could not be created on this disk. Use a different name, make more room on the disk, unlock it or use a different disk."

                       This errortext ALWAYS means that the syntax for the filepath 'XXXXX'  is incorrect.

                  • 7. Re: Path to Desktop works on one computer, but not another
                    Paper_Queen

                         Hi hbrendel,

                         I think we're all on the same page about the map to the filepath being off. How or where to fix that is what has me completely lost (remember, I'm not a coder or a scripter...am trying to repair someone else's work). 

                         I welcome a specific solution for this specific string:

                    Set Variable [$file; Value:Get ( DesktopPath ) & "350HTML" & "/" & $abbreviations & ".html"]

                         The file path for the target folder is:

                    [My HD name] / Users / [my user name] / Desktop / 350html

                          

                    P.S. Upper/lower case in the folder name (350html) has had no impact.

                    • 8. Re: Path to Desktop works on one computer, but not another
                      Paper_Queen

                           Would love addiitonal assistance with this.... Just need to know which part of the script language needs to be adjusted since everything I see online makes it appear correct (in addition to the fact it does work properly on another, older computer that's being retired). 

                           Anyone...? 

                      • 10. Re: Path to Desktop works on one computer, but not another
                        philmodjunk
                                            

                                                 "XXXXX could not be created on this disk. Use a different name, make more room on the disk, unlock it or use a different disk."

                                       
                                            

                                                 This errortext ALWAYS means that the syntax for the filepath 'XXXXX'  is incorrect.

                                       

                                            Minor Quible: This error text is exactly correct in the first sentence, but the suggested fixes in the second sentence ignore the most common cause of this error. Thus, this errortext, almost always means an incorrect filepath.

                                            I suggest posting the exact script that is failing. That allows interested parties to examine the entire process for possible reasons for why it isn't working for you.

                                            To post a script to the forum:

                                              
                        1.                          You can upload a screen shot of your script by using the Upload an Image controls located just below Post A Answer.
                        2.                     
                        3.                          You can print a script to a PDF, open the PDF and then select and copy the script as text from the opened PDF to your clipboard for pasting here.
                        4.                     
                        5.                          If You have FileMaker Advanced, you can generate a database design report and copy the script as text from there.
                        6.                     
                        7.                          If you paste a text form of the script, you can use the Script Pretty box in the Known Bugs List database to paste a version that is single spaced and indented for a more professional and easier to read format.
                        8.                

                              

                        • 11. Re: Path to Desktop works on one computer, but not another
                          Paper_Queen

                          PhilModJunk, I could KISS YOU (sorry if that's too forward, but I'm pretty happy right now). Your suggestion to print out the script exposed a line of code buried on page 5 (of 8) that caused the problem.

                               I was focused on a line near the end of the script that included ( DesktopPath ), based on the plethora of web pages addressing export-to-desktop problems (thus my request for specific directions, not just more links to more web pages).

                               Turns out the culprit was a line much earlier in the script---one that made no mention of ( DesktopPath ), but did specify a file path tied to my old computer. After correcting the path, my export went smooth as silk, all 62 HTML pages of it. 

                               Had you not provided actionable steps, I never would have spotted this thing.

                               Thank you, thank you, thank you...you're a FileMaker hero! yes