# backslash problems

**URL:** <https://forum.servoy.com/t/backslash-problems/6030>\
**Category:** Classic Servoy\
**Created:** [June 4, 2006, 3:43pm UTC](https://forum.servoy.com/t/backslash-problems/6030 "2006-06-04T15:43:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gstein](https://avatars.discourse-cdn.com/v4/letter/g/c89c15/32.png) [@gstein](https://forum.servoy.com/u/gstein)\
**Post date:** [June 4, 2006, 3:43pm UTC](https://forum.servoy.com/t/backslash-problems/6030/1 "2006-06-04T15:43:33Z")

</div>

We need to save a file location returned from Servoy’s plugins.file.showFileOpenDialog method. The problem is, the backebd DB we are using is mysql and some of our users are running Windows machines.

Mysql strips off a backslash from an insert statement because it is their escape character, so:

c:\myfolder\mysubfolder\myfile becomes c:myfoldermysubfoldermyfile

I can get around this by putting two backslashes in place of one, so:

c:\myfolder\mysubfolder\myfile becomes c:\myfolder\mysubfolder\myfile

The problem is, in servoy I can’t seem to modify the variable that holds the value returned by the dialog box. I tried:

```auto
	var myval = plugins.file.showFileOpenDialog(1);
	myval = myval.replace("\\","\\\\")

```

but when it runs I get an error: replace is not a function.

Any suggestions on how to deal with this?

Thanks.

---

<div class="post-metadata">

**Author:** ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://forum.servoy.com/u/patrick)\
**Post date:** [June 4, 2006, 3:49pm UTC](https://forum.servoy.com/t/backslash-problems/6030/2 "2006-06-04T15:49:04Z")

</div>

You apply replace to a JSFile, not a stirng. What should work is

```auto
myval.getPath().replace(...)

```
