###Date: 2018.5.23
================================================================
方法一:os.listdir()
getallfiles.py
import os
import sys
allfile = []
def get_all_file(rawdir):
allfilelist=os.listdir(rawdir)
for f in allfilelist:
filepath=os.path.join(rawdir,f)
if os.path.isdir(filepath):
get_all_file(filepath)
allfile.append(filepath)
return allfile
if __name__=='__main__':
if(len(sys.argv) < 2):
print("Usage: getallfiles.py rawdir")
exit()
rawdir = sys.argv[1]
#curre