Raw strings are for string literals (written directly in the source file), which seems not to be here. In any case, forward slashes are not special characters - they can be embedded in a regular string without any problems. These are backslashes, which usually have a different meaning in the string, and must be escaped so that they are interpreted as literal backslashes.
To replace the backslash with a slash:
# Python: string = r'C:\dummy_folder\a.txt' string = string.replace('\\', '/')
Cameron
source share