Question

I have a simple directory containing just 2 links to other directories. os.walk does not walk into them, it reports 2 files and 0 directories. I note the docs refer to "symlink" which I suspect is a Unix term not MS but Im not sure. Or is there something else im missing?

[Python 2.7 on Vista Pro]

Was it helpful?

Solution

It does not work on Windows (at least in Windows 7).

followlink depends on os.islink, os.isdir. But both returns False for Link directory in windows (in Python 2.7).

BTW, in Python 3.2+, os.islink return True for symlinks. But os.isdir still return False. os.walk does not work neither.

See os.path.islink on windows with python.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top