hi all
i want my program to ignore ntfs links, but os.path.islink( ) isnt work as
i expect
print os.path.islink( '''C:\Documents and Settings\åÇÏÒ\M y
Documents\Scrip ts\Antiloop\''' ')
outputs
False
far file manager said 'C:\Documents and Settings\åÇÏÒ\M y
Documents\Scrip ts\Antiloop\' is link
how to detect ntfs links?
=program======
import os, os.path
def get_all_files(p ath):
if len(path) > 0:
if path[-1] == ':':
path=path+'\\'
try:
for i in os.listdir(path ):
j = os.path.join(pa th, i)
if os.path.isdir(j ) and not os.path.islink( j):
for ii in get_all_files(j ):
yield ii
else:
yield j
except:pass
for i in get_all_files(' c:'):
print i
==============
i want my program to ignore ntfs links, but os.path.islink( ) isnt work as
i expect
print os.path.islink( '''C:\Documents and Settings\åÇÏÒ\M y
Documents\Scrip ts\Antiloop\''' ')
outputs
False
far file manager said 'C:\Documents and Settings\åÇÏÒ\M y
Documents\Scrip ts\Antiloop\' is link
how to detect ntfs links?
=program======
import os, os.path
def get_all_files(p ath):
if len(path) > 0:
if path[-1] == ':':
path=path+'\\'
try:
for i in os.listdir(path ):
j = os.path.join(pa th, i)
if os.path.isdir(j ) and not os.path.islink( j):
for ii in get_all_files(j ):
yield ii
else:
yield j
except:pass
for i in get_all_files(' c:'):
print i
==============
Comment