- Local time
- 11:15 PM
- Posts
- 1,041
- Location
- Central Florida, USA
- OS
- Win-11/Pro/64, Optimum 11 V5, 23H2 22631.3374
For several years, I have been using the following commands (2) to count the files on my C: drive, before and after I delete temp and other junk files.
Sometimes, the difference between the two file counts, does not equal the number of files I actually see being deleted. So I can only conclude that the file counters are not actually counting ALL the files on the HD. Some files are missing! ??? Maybe some of the very files I want to delete.
Here are the two lines of code that do the file counting.
First Count, Before Cleaning:
for /f "delims=" %%A in ( ' dir /a /s "C:\" ^| find /c /v "" ' ) do set Count1=%%A
Second Count, After Cleaning:
for /f "delims=" %%A in ( ' dir /a /s "C:\" ^| find /c /v "" ' ) do set Count2=%%A
Then at the end of the program, Count 2 is deducted from Count 1 and the difference is printed as "Files Deleted".
So my question: Can these commands be revised to that they will indeed count every file on the PC's Hard Drive. ( the C: partition)
Or, do I need an entirely new command, possibly in "Power Shell" ?
Thank you for your consideration.
TechnoMage
Sometimes, the difference between the two file counts, does not equal the number of files I actually see being deleted. So I can only conclude that the file counters are not actually counting ALL the files on the HD. Some files are missing! ??? Maybe some of the very files I want to delete.
Here are the two lines of code that do the file counting.
First Count, Before Cleaning:
for /f "delims=" %%A in ( ' dir /a /s "C:\" ^| find /c /v "" ' ) do set Count1=%%A
Second Count, After Cleaning:
for /f "delims=" %%A in ( ' dir /a /s "C:\" ^| find /c /v "" ' ) do set Count2=%%A
Then at the end of the program, Count 2 is deducted from Count 1 and the difference is printed as "Files Deleted".
So my question: Can these commands be revised to that they will indeed count every file on the PC's Hard Drive. ( the C: partition)
Or, do I need an entirely new command, possibly in "Power Shell" ?
Thank you for your consideration.
TechnoMage
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.