python遍历目录

  开发

 

 

#!/usr/bin/python
import os, sys

path = sys.argv[1]
for dirpath, dirnames, filenames in os.walk(path):
for file in filenames:
fullpath = os.path.join(dirpath, file)
print fullpath

LEAVE A COMMENT

Captcha Code