- Local time
- 4:03 AM
- Posts
- 1,031
- Location
- Central Florida, USA
- OS
- Win-11/Pro/64, Optimum 11 V5, 23H2 22631.3374
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.
My Computer
System One
-
- OS
- Win-11/Pro/64, Optimum 11 V5, 23H2 22631.3374
- Computer type
- PC/Desktop
- Manufacturer/Model
- Home Made w/Gigabyte mobo/DX-10
- CPU
- AMD FX 6350 Six Core
- Motherboard
- Gigabyte, DX-10, GA-78LMT-USB3
- Memory
- Crucial, 16 GB
- Graphics Card(s)
- NVIDEA GeForce 210, 1GB DDR3 Ram.
- Sound Card
- Onboard
- Monitor(s) Displays
- 24" Acer
- Screen Resolution
- 1280x800
- Hard Drives
- Crucial SSD 500GB, SanDisk 126GB SSD, Toshiba 1TB HD
- PSU
- EVGA 500 W.
- Case
- Pac Man, Mid Tower
- Cooling
- AMD/OEM
- Keyboard
- 101 key, Backlit/ Mechanical Switches/
- Mouse
- Logitech USB Wireless M310
- Internet Speed
- Hughes Net speed varies with the weather
- Browser
- Firefox 64x
- Antivirus
- Windows Defender, Super Anti Spyware
- Other Info
- Given to me as DEAD, and irreparable.
Rebuilt with Gigabyte mobo, AMD cpu, 16GB ram and 500GB Crucial SSD.