I'm have an issue about displaying the files from a network drive on Windows.
path = "\\\\nexus\\File Server\\Technical\\MyDrive\\Software\\Releases\\%s\\%s\\" %(release, module)
where \\nexus\
is a network drive.
My main issue is given that a user enters correct variables, i'm unable to show the contents of the directory requested (the contents of 'module').
Things I've tried
os.listdir(path)
The issue with the line above is that it returns a windows error [123] which is, a can not find directory error. This is because listdir() seems to double all the back slashes resulting in :"\\\\\\\\nexus\\File Server\\\\Technical\\\\MyDrive\\\\Software\\\\Releases\\\\release\\\\module\\\\"
print(glob.glob(path))
I didn't really know exactly how it works :P but it seems just to display the directory supplied and not the contents of the ending directory\\nexus\File Server\Technical\MyDrive\Software\Releases\release\module\"
I've seen an os.walk
however im not sure how its works, in that how does it defines what is the base directory /directories and what is the rest of the path
Extra notes: The contents of 'module' will always be a zip file, also the directory will generally contain at maximum five zip files.