shorten path to files
larry.bates at websafe.com`
Fri Jun 27 15:26:10 CEST 2008
> I need to retrieve the content of some files which are placed on a
> network drive so in order to open them I need the full path to the
> Unfortunately some times the path is longer than 256 characters and in
> Windows such a path is too long with the result that the file is not
> found (though it is there).
> Is there any way around this?
You have some other problem. The path limit of 256 characters is a DOS limit
not a Windows limit. You can have paths longer than 256 characters, just not in
a command prompt window. If not, how could the file have ever been created (you
said the file was actually there)?
You can also map a drive to some parent folder:
net use p: \\server\folder1\folder2\folder3\folder4
then access the files relative to this drive.
More information about the Python-list