On Mar 6, 7:09 pm, "Tim Golden" <m...@timgolden.me.uk> wrote: > venutaurus...@gmail.com wrote: > > Hello All, > > I have a requirement where I've to access folders with > > path lengths >255 ( Windows only supports 255). To do this I've > > created junction points for the folders whose length is > 255. The > > problem is my python script is unable to recognize these junction > points. > > > As an example I've a junction point JC04 pointing to a folder > > DeepPathLevel57which has path length around 700. When I do > > > "cd E:\JunctionPaths\JC04\DeepPathLevel57" at command prompt, am able to > > access the folder. When I try to list the directories in that folder > using os.listdir in python am getting the below error. > > You shouldn't need to mess around with junction points; > just recast your r"c:\very\long\...\path" as > ur"\\?\c:\very\long\...path" and pass that into whatever > function you're using. > > More info here: > > http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx > > TJG
Thank you very much for your reply... but will the same work if I try to open it like the below? f = open("\\?\C:\very\very\...path") Thank you, Venu Madhav. -- http://mail.python.org/mailman/listinfo/python-list