I am trying to write a script that runs through a list of directory paths (dir.txt) and picks out the path, does a check on the date modified on the file (from the path) against the current date (Today). If it matches, it says OK.
My code so far:
for /f "tokens=1" %%i IN ('dir /tw "C:\Ada\Ada1.txt" ^| find /i "Ada1.txt"') do set %ADA1=%%i
IF %DAY%==%ADA1% (ECHO ADA1 OK!) ELSE (ECHO ADA1 Not ok!)
However I need it to go through dir.txt and pick up the directory paths and assign the variables itself, and not me having to do that for each path. On a side note, I would also prefer to have the actual filename as the variable name.
Thanks in advance!