# 随机拷贝100个文件
import os, sys,random
inputDir = sys.argv[1]
outputDir = sys.argv[2]
if not(os.path.exists(outputDir)):
os.mkdir(outputDir)
files = os.listdir(inputDir)
random.shuffle(files) #打乱顺序
for file in files:
count = 1
filepath = os.path.join(inputDir, file)
outputpath = os.path.join(outputDir, file)
os.system("cp '%s' '%s'"%(filepath, outputpath))
count += 1
if (count > 20):
break