I am working in python and I need to convert this:
C:\\folderA\\folderB to C:/folderA/folderB
I have three approaches:
dir = s.replace(\'\\\\
I recently found this and thought worth sharing:
import os path = "C:\\temp\myFolder\example\\" newPath = path.replace(os.sep, '/') print newPath Output:<< C:/temp/myFolder/example/ >>