More specifically:
@dir /b /s "c:\myfolder\*.*">files.tx
As for checking for new files, your best bet would be something like this:
for /f "delims=" %%I in ('dir /b /s "c:\myfolder\*.*"') do (
find "%%~I" "files.txt" >nul
if %errorlevel% neq 0 @echo %%~I>>"files.txt"
)
Main Topics
Browse All Topics





by: CaudaxPosted on 2005-09-18 at 22:40:50ID: 14909580
I dont know why you wouldn't just want a batch that simply puts all the filenames in the directory in the files.txt.
The batch for that would be:
@DIR /B /S>FILES.TXT