python list file in certain diretory
1 import os
2 files = os.listdir("path")
3 f = open("save the files.txt","a")
4 for file in files:
5 f.write("path\\"+file+"\n")
6 f.close()
posted on 2012-02-08 17:53 york_software123 阅读(254) 评论(0) 收藏 举报
1 import os
2 files = os.listdir("path")
3 f = open("save the files.txt","a")
4 for file in files:
5 f.write("path\\"+file+"\n")
6 f.close()
posted on 2012-02-08 17:53 york_software123 阅读(254) 评论(0) 收藏 举报