it works for me otherwise. (here's a copy of my code that works (which should be just like yours)):
@echo off
:main
set dir=C:\Downloads
dir /b %dir% >FilesInDir.txt
for /f "tokens=*" %%I in ('type FilesInDir.txt') do set line=%%I & call :SearchFile
del FilesInDir.txt
goto :eof
:SearchFile
find /i "%line:~0,-1%" C:\Downloads\Files_To_Keep
if errorlevel 1 del "%dir%\%line:~0,-1%"
Main Topics
Browse All Topics





by: gilbarPosted on 2005-12-14 at 11:21:25ID: 15484840
how come you refer to it first as 'Files_To_Keep.xls', then (in the Code) as 'Files_To_Keep.txt'?