Parse a log file's last modified date into a variable
问题 I am trying to set a variable to the number of days since a log file was modified. this way I can use that value as a flag for the next time a command runs. example: if the command ran yesterday, the value will be 1 if the command ran 5 days ago, the value will be 5 I'm seeing methods for similar issues such as: OR %%f IN (%filename%) DO SET filedatetime=%%~tf or if (file.exists()) { Date lastModified = new Date(file.lastModified()); } I just don't know batch scripting or powershell very well