I was cleaning out my harddisks and found a script lying around to do what (I think) you are looking for. Completely forgot about that one ..
Instructions:
- Save FindBook.cmd in an empty folder
- Save your "text file with 3,200 lines" as titlelist.txt in that folder
- Create a folder "filelist" in that folder.
- Copy the "dozen text lists of ebook filenames" to the filelist folder
Result should be something like:
Code: Select all
C:\test\boek\FindBook.cmd
C:\test\boek\titlelist.txt
C:\test\boek\filelist\index1.txt
C:\test\boek\filelist\index2.txt
- Run FindBook.cmd
Output:
Code: Select all
filelist\index1.txt:George Orwell - 1984 (epub).rar
filelist\index2.txt:George Orwell - 1984 (epub).rar
filelist\index1.txt:H G Wells - War of the Worlds (pdf).rar
filelist\index2.txt:Isaac Asimov - [Robot 0.1] - I, Robot (Mobi).rar
Press any key to continue . . .
This was tested with the following inputfiles:
Titlelist.txt:
George Orwell 1984
H. G. Wells War of the Worlds
Isaac Asimov I, Robot
Index1.txt
George Orwell - 1984 (epub).rar
H G Wells - War of the Worlds (pdf).rar
Some random filename.txt
Index2.txt
George Orwell - 1984 (epub).rar
Isaac Asimov - [Robot 0.1] - I, Robot (Mobi).rar
Some random filename.txt
Findbook.cmd
Code: Select all
@echo off
pushd "%~dp0"
for /f "delims=" %%x in (titlelist.txt) DO call :AXI "%%x"
echo.
pause
goto :EOF
:AXI
set ff=%~1
set regex=^%ff: =.*%.*
findstr /i /R "^%regex%" filelist\*
goto :EOF