I'm working on a python cleanup script. I'm trying to determine the amount of files and total space prior to the cleanup. Also, want the total files and space of files that are deleted by the script. is os.path.getsize(filePath the way to go?
when i run my script it will give me the number of files to be deleted but i can't get a starting count(files and size) or a count (files and size) after i run the delete. I'm wanting this so i can figure out how much space i'm saving by running the clean. Any help would be appreciated.
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!