and this is resulting in /c:/users/med/dsktop/
is dsktop a typo or is it really returing dsktop. I will assume that this is a typo and that you are really getting: /c:/users/med/desktop/
If I read you correctly, you want to use this to get: /c:/users/med/downloads/
You should be able to use Substitute ( $Desktop ; "desktop" ; "downloads" )
You shouldn't need to substitute any / characters. But if you are really getting dsktop, then you need to use:
Substitute ( $Desktop ; "desktp" ; "downloads" )
please note that subsitute is case sensitive so if your text has desktop, you can't refer to "Desktop" in your substitute function call and get "desktop" replaced with other text.
Thank you, the last statement you wrote had the key "case sensitive" because actually the result was /C;/Users/med/Desktop/
and I ignored that because in all other parts of filemaker like comparisons and finds, case is ignored.
I converted the result to lower case and then used substitute and it works now.