I know I ask a lot of you guys, but ya'll are always so very helpful.
I'm trying to make a batch file that will detail info about a system and echo info into a txt file (IE Cache Size, # of IE Temp Files, MB of system temp files (as listed in Disk Cleanup), # of Windows Prefetch Files and # of files in C:\Quarantine, Size of the Desktop folder for the current profile, Amount of system ram (as in computer properties) and Free disk space.)
CODE
Echo Number of Windows Prefetch Files Cleared: >> %systemdrive%\temp\%computername%_CheckList_%dd%_%mm%-%yy%.txt
Attrib.exe /s %SYSTEMROOT%\Prefetch\*.pf |find /c /v "" >> %systemdrive%\temp\%computername%_CheckList_%dd%_%mm%-%yy%.txt
DEL /q %SYSTEMROOT%\Prefetch\*.pf
My first hurdle... I can't get my batch to echo to the same line..Attrib.exe /s %SYSTEMROOT%\Prefetch\*.pf |find /c /v "" >> %systemdrive%\temp\%computername%_CheckList_%dd%_%mm%-%yy%.txt
DEL /q %SYSTEMROOT%\Prefetch\*.pf
I would like the output to be something like:
"Number of Prefetch Files = xxx"
instead of:
"Number of Prefetch Files ="
"xxx"
Second, the Attrib command works ok for Prefetch folder... but for example, the IE Temp folder it will only echo that there is 1 file. How do we get a correct reading of how many temp IE files there are?
Third, is there an easy way to script a batch to interpret the IE Cache size (Registry value is in hex) and then echo the dec. value into a txt file?
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\Cache\Content]
"CacheLimit"=dword:00019000
So, the overall outcome I am looking for is something like this...
Available Memory: xxx
Free Disk Space: xxx
Desktop File Size: xxx
IE Temp Files: xxx
IE Cache Size: xxx
Quarantined Files: xxx
Windows Temp Files: xxx
Windows Prefetch Files: xxx