1 import os,sys 2 datadir='Desktop/' 3 files=os.listdir(datadir) 4 size=0 5 for file in files: 6 size +=os.path.getsize(datadir+file) 7 print size