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