Don't do this:
#File to query
string = "C:\DOCUME~1\profileName\LOCALS~1\Temp\\Temporary Directory 1 for
deluxetreee (2).zip\Christmas.exe"
#Substitute "\" to "\\"
path = re.sub('\\\\', '\\\\\\\\', string)
I can see nothing wrong with this particular bit of code, but sooner or later
doing this sort of thing will trip you up. Instead use a raw string
(r"mys\t\ri\ng") that will leave your whacks intact. All you need is this:
path = r"C:\DOCUME~1\profileName\LOCALS~1\Temp\\Temporary Directory 1 for
deluxetreee (2).zip\Christmas.exe"
I notice you have a doubled \ in path after Temp which may be the problem,
depending on the target filesystem.
--
Paul Keating
The Hague
_______________________________________________
python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32