import os

print(os.path.getsize(filepath))
# 输出单位为字节