0

I download some pdfs and csv files from my server and many times the files are empty. I have to check manually all those files. Generally I get 80-90 files in a day and I am planning to write a python script for it.

I have tried below code. Please find it below:

import os
os.stat("Book1").st_size == 0

but since the size of an empty excel file is also 8 KB this isn't working. Also it will be different case for pdf files.

I want to get all names of the blank files in a new txt file.

Mitesh Agrawal
  • 67
  • 3
  • 12

0 Answers0