Hello,
I have a javascript file that is ran through a windows job using cscript. However, I can't seem to fix this thing to work correctly. Inside the file, it basically takes a URL and transforms it to a UNC path.
ex: http://mysite.com/document1.htm to \myserver\document1.htm
However, I can't seem to get the /'s to goto \'s and am at a loss why.
I've tried 2 things basically
1) str = str.replace(/\/g, "\\");
2) str = str.replace("/", "\\");
Any idea why it wont work?
Thanks, Dave