I have 2 plain text files, one on the local PC and another on the server. (The files only store the release date, e.g. 02/02/2018).
I want to write a windows batch-file to check if the text file on the server is a newer date than the date on the users machine and download the new files from server based on this.
I have used fc and it works fine, but the concern is to maintain the newer set of files.
Please advise if this is achievable.
Your sample date is ambiguous.
To compare a date (without converting to datetime type or serial) you need to order it by yyyy,MM,dd.
What is your
02/02/2018meant to beMM/dd/yyyy? Ordd/MM/yyyy?The batch contains both variants,
MM/dd/yyyyis commented out.Sample output: