4 Replies Latest reply on Apr 30, 2013 6:34 PM by BillMiller

    Open URL file command

    BillMiller

      What's wrong with this script?

       

      OPEN URL:

      file://Users/williamtmiller/Documents/HPR/BUSINESS/something.doc

       

       

      Q: Does Open URL work for ".doc" files?

       

      I keep getting error 5.

      What am I doing wrong?

       

      Details: FM12; local file; this command sometimes works, sometimes does not.

       

      Thanks for any help you can provide,

      bill

        • 1. Re: Open URL file command
          Malcolm

          What's wrong with this script?

           

          OPEN URL:

           

                              file://Users/williamtmiller/Documents/HPR/BUSINESS/something.doc

           

          Nothing wrong with that, though there may not be a file in that location.

           

          The URL is PROTOCOL & "://" & file path.

           

          A file path is absolute or relative. If you start your file path with "/" you'll have an absolute path. If you don't you'll have a relative path.

           

          malcolm

          • 2. Re: Open URL file command
            BillMiller

            HI Malcolm,

             

            Thanks for your response.

            So are you saying that the only thing wrong is the case of "file://" vs. "FILE://"?

             

            Or do I also need to make it, "FILE:///Users/williamtmiller/Documents/HPR/BUSINESS/something.doc"

             

            Wasn't getting a good result on either of those options.

            • 3. Re: Open URL file command
              Malcolm

              So are you saying that the only thing wrong is the case of "file://" vs. "FILE://"?

               

              It's not the case. You're missing the leading slash in the file path.

               

              The empty protocol string is

               

              file://

               

              Your file path is

               

              /Users/williamtmiller/Documents/HPR/BUSINESS/something.doc

               

              together they become

               

              file:///Users/williamtmiller/Documents/HPR/BUSINESS/something.doc

               

              malcolm

              • 4. Re: Open URL file command
                BillMiller

                Thanks!