How to Get the File Size using Python
To get the file size (in bytes) using Python: Copy import os file_path = r”path where the file is stored\file_name.file_extension” file_size = os.path.getsize(file_path) print(file_size) Optionally, to get the size in bytes, kilobytes, megabytes and gigabytes: Copy import os file_path = r”path where the file is stored\file_name.file_extension” file_size = os.path.getsize(file_path) print(“File size in Bytes: ” + … Read more