Not sure what I am doing wrong here...
Windows 7 but running it as a dos batch file
have a bunch of PDFs in a folder (c:\files\*.pdf) and I want to see which of these files are not in a log file.
in the log file the messages are (once per file):
>>>log.txt
Login name is
[email protected]Attached binary file: MAY2019_1978727_E.pdf
File saved.
>>>
What I thought I would need was...
@echo off
for %%f in (c:\files\*.pdf) DO (
echo %%~nxf
findstr /m %%~nxf log.txt
if %errorlevel% NEQ 0 (
echo %%~nxf was not found XXXXXXXXX
)
)
pseudo code...
for all the PDFs in the "files" folder
find the file name (no path header) in the log file log.txt
If the file is not in the folder
then echo the file name was not found XXXXXX
basically the log file confirms all the files that should be in the folder but looking for any PDFs that are not in the log file for some reason
I am sure it is something simple but brain stopped working after version 15 and a couple of hours googling lol
thanks