AnsweredAssumed Answered

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

Question asked by hobbiesdeveloper on Mar 14, 2012
Latest reply on Mar 14, 2012 by philmodjunk

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.

Outcomes