Long pathes on windows

David LeBlanc whisper at oz.net
Mon Jun 17 16:29:17 EDT 2002


I'm not sure how you convert long paths containing spaces into the short
mangled names that Windows 98 etc. used. I know they are on Windows 2000,
since i've had a long filename "fold" itself for no reason I could figure
out, but I don't know how to _make_ it happen.

You actually don't have to get rid of the spaces (although it's inconvenient
having them imo): all you need to do is quote the whole path as in: f =
open("c:\\Documents and Settings\\Administrator\\Local
Settings\\Temp\\conf.h", 'rw').

David LeBlanc
Seattle, WA USA

> -----Original Message-----
> From: python-list-admin at python.org
> [mailto:python-list-admin at python.org]On Behalf Of Roman Yakovenko
> Sent: Monday, June 17, 2002 11:18
> To: python-list at python.org
> Subject: Long pathes on windows
>
>
> Good evening. I have big problem Windows 2000 and small one.
> The small one is long pathes on windwos. How can I convert long
> path with ' '
> into short path?
>
> Thanks for the help. Roman.
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list






More information about the Python-list mailing list