@echo off & setLocal & color e0
MODE CON:cols=78 lines=18
title Howmany files removed/added without your knowledge or permission ?
echo. by Eddie Duncan_Dunlop Ver 3.1set /p old=<%temp%\store.txt
if not exist %temp%\list.txt echo (run twice first time)
if "%old%"=="" set old=0
cls & echo.
echo. Wait making a list of all the files currently on your hdd C:\
dir c:\*.* /b /a /s /o:D /c >%temp%\list.txtecho.& echo. Wait counting the list of how many files were found
set count=0 & :: by Eddie Duncan_Dunlop Ver 3.0for /f %%n in (%temp%\list.txt) do set /a count+=1
if not exist %temp%/store.txt echo 1>%temp%/store.txt
echo %count%>%temp%/store.txt
set /a differ=%count%-%old%
echo %date% %time% Lastcount was %old%,new count=%count%, Difference = %differ% >>%temp%\results.txt
echo mt>%temp%\list.txt
start %temp%\results.txtmessage edited by eddiedd
The first, and (imo) most relevant concern is that IF the computer is used for internet access, the file-count would be totally meaningless, due to browser caching. At least with IE, I know such comparisons would be worthless. Second, without a comparison of "benchmark" or previous fileset, and current fileset, I don't see how this could solve anything, because there is no data as to files removed and files added (not to mention files changed!). File names have no relevance, only file content. Many virus' do their work by substituting viral content for main-line DLL and .EXE files. If nothing else, I would suggest avoiding or otherwise handling cache and temp files, and using FSUM (compare previous to current) instead of just a dir. listing to test files integrity.
And then there's registry alterations to track as well...message edited by nbrane
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |