I'm having difficulties parsing filepaths sent as arguments:
If I type:
os.path.normpath('D:\Data2\090925')
I get
'D:\\Data2\x0090925'
0bviously the \0 in the folder name is upsetting the formatting. I can correct it with the following:
os.path.normpath(r'D:\Data2\090925')
which gives
'D:\\Data2\\090925'
My problem is, how do I achieve the same result with sys.argv, namely: os.path.normpath(sys.argv[1])
I can't find a way for feeding sys.argv in a raw mode into os.path.normpath() to avoid issues with folders starting with zero!