How to search specific files from two folders and compare timestamp if the same or what is the newest files given using Batch Windows Scripting
问题 I have initial code for searching and comparing in ALL files: SET FILE1=Directory1\* SET FILE2=Directory2\* FOR %%i IN (%FILE1%) DO SET DATE1=%%~ti FOR %%i IN (%FILE2%) DO SET DATE2=%%~ti IF "%DATE1%"=="%DATE2%" ECHO Files have same age && GOTO END FOR /F %%i IN ('DIR /B /O:D %FILE1% %FILE2%') DO SET NEWEST=%%i ECHO Newer file is %NEWEST% :END How do specifically search based on the directory that this certain file name should be search and compare? Sample: I want to search all specific like