I've written a batch file that cleans out tons of garbage from my C: drive.
At the start of the batch file is a command that counts the number of files on C:
and after the cleanup, the command runs again to count the number of files left after cleaning.
The two numbers are used to calculate the number of files actually deleted. That works great, but,
I'd also like to know how many megabytes were deleted.
I can do that manually, by just checking the size of the Drive, in "Properties" before and after I run the batch file.
I did that today and it works great. But, it would be even neater if I could incorporate that check for drive size into my batch file.
Is that even possible, using either batch or Powershell language?
Either way, it's beyond my level of expertise. Any help would be greatly appreciated.
At the start of the batch file is a command that counts the number of files on C:
and after the cleanup, the command runs again to count the number of files left after cleaning.
The two numbers are used to calculate the number of files actually deleted. That works great, but,
I'd also like to know how many megabytes were deleted.
I can do that manually, by just checking the size of the Drive, in "Properties" before and after I run the batch file.
I did that today and it works great. But, it would be even neater if I could incorporate that check for drive size into my batch file.
Is that even possible, using either batch or Powershell language?
Either way, it's beyond my level of expertise. Any help would be greatly appreciated.