4 Replies Latest reply on Mar 14, 2012 3:25 PM by philmodjunk

    How to replace all "\" with "/" inside a variable through a script

    hobbiesdeveloper

      Title

      How to replace all "\" with "/" inside a variable through a script

      Post

      Hello,

      I'm having a problem with getting the Substitute function to work using it to replace the "\" Backward Slashs with "/" Forward Slashs.

      For Example:

      C:\Users\hobbies4life\Desktop\Pictures\ASC111.jpg

      to this

      C:/Users/hobbies4life/Desktop/Pictures/ASC111.jpg

      The script function isn't able to find an end quote to accept it as a function inside a calculation screen.

      The calculation that i'm using is "imagewin:/" & Substitute( $file ; "\" ; "/" ) and it gives me the FileMaker error "This text constant does not end with a quotation mark.". How do i go on getting the forward and back Slashs working in this function?

       

      Thanks.