python file size in mb from file path code example Example: python get file size in mb import os os.path.getsize("path/to/file") / (1024*1024)