Jump to content

Find unused / obsolete files in i386 folder


Recommended Posts

Hello,

I am trying to build a batch which extracts all INF,SIF & INI Files from i386 folder in XPCD (SP3 integrated).

But now I am at a point at which I do not know how to continue.

In theory I wanted to do the following steps:

1. Extract all INF,SIF & INI Files from i386 to folder _extracted

2. For every file in "\i386\" search for file name in every file in _extracted

3. Clean Logfiles: Delete every line ending with " : 0".

4. Delete all files which are not empty

5. The files remaining are files which file's names could not be found anywhere.

These files can probably be removed!?

Here is my attempt in Batch-Script. To use it, just Drag&Drop CD-Folder on it.

cd "%1"
cd i386
mkdir _extracted
mkdir _extracted\Logs
mkdir _extracted\Logs2
copy *.sif _extracted
copy *.inf _extracted
copy *.ini _extracted
expand -r *.in_ _extracted
del _extracted\*.inc


for /f "tokens=1 delims=_" %%a in ('dir /b *._') do (
find /C /I "%%a" _extracted\*.*>_extracted\Logs\%%a_.LOG
)


for /f %%a in ('dir /b _extracted\*') do echo : 0 >> _extracted\__files.dat
move ..\__files.dat files.dat

cd ..

for /f "tokens=1 delims=_" %%a in ('dir /b *') do (
findstr /e /i /g:__files.dat %%a>Logs2\%%a_.LOG
)

Maybe some one can help me with this file so it's possible to look for unused files easily. :)

/PITU

Link to comment
Share on other sites


OK, I tried it myself and finally came up with this batch:

cd "Kopie von WXP_SP3"
cd i386
mkdir _extracted
mkdir _Logs
mkdir _Logs2
copy *.sif _extracted
copy *.inf _extracted
copy *.ini _extracted
expand -r *.in_ _extracted
del _extracted\*.inc

echo.Durchsuche IN*-Dateien nach jeder anderen Datei im Ordner
for /f "tokens=1 delims=_" %%a in ('dir /b *.*') do (
find /C /I "%%a" _extracted\*.*>_Logs\%%a_.LOG
)

echo.Filtere Log-Dateien
for /f %%a in ('dir /b _Logs\*.*') do (
findstr /e /v /i ": 0" _Logs\%%a>_Logs2\%%a_2.LOG
)

for /f %%a in ('dir /b _Logs2\*.*') do (
findstr /L "EXTRACTED" "_Logs2\%%a">_Logs3\%%a
)

rmdir _extracted
rmdir _Logs
rmdir _Logs2

It a couple hours to run on my - not as fast as I want it to be - computer, but it produced my a list of 50 files which should by save to delete, as they are not mentioned in any INF, INI or SIF file. :)

My "save-to-delete-list":

ATOMIC.WM_
BLUESKY.WM_
COMPDATA_
comsdupd.ex_
faxpatch.exe_
GOO.WM_
HWDB.DLL_
ICONIC.WM_
Logs2_
MARKET.IN_
MSDWINTL.DL_
MSN13.IN_
MSN13.MA_
MSN40.IN_
MSN40.MA_
MSN53.IN_
MSN53.MA_
MSN9XMIG.DL_
MSNCSAPI.DL_
MSNEMAIL.IC_
MSNMIGR.IN_
MSNREAD.HT_
MSUNI11.DL_
NV4.IN_
oobedkn.ht_
oobedn.ht_
PERSONAL.WM_
PRIVACY.HT_
PRO.WM_
RADIO.WM_
RDSKTPW.CH_
RUSTY.WM_
sp2.cab_
SQDLL.DL_
SYSPARSE.EXE_
tscupdc.dll_
WIN9XMIG_
WINNTBBA.DLL_
WINNTUPG_
WMMFILT.DL_
WMMRES.DL_
WMMUTIL.DL_
WMPVIS.DL_
WSDU.DLL_
WSDUENG.DLL_
XPTHT33D.JP_
XPTHT41W.HT_
XPTHT78D.JP_
XPTHT79D.JP_
XPTHT80D.JP_

I will try what happens when installing without these files. But if you want to test whether these files are needed - do so and post your findings here.

/PITU

Link to comment
Share on other sites

nice try !

but I hope MS will release a clean SP3 winxp disc, so it can be used other than our home systems ;-)

I always see a winxp sp2 integrated manually is more bloated than MS release ... so I always wait ms discs ...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...