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