I have a folder on a local PC that updates files through Dropbox. I have created a batch script that runs through a scheduler each day.
So far it checks to see if a folder is empty (C:\TheGlenFTP\sendho
) before running some xcopy commands. I would like to add a condition to this script - that it also only runs the xcopy commands if the fileC:\Users\user\Dropbox\Combined\orderhea.dat
is timestamped with today’s date.
Can any of you help with this?
This is the batch script so far.
@Echo offSetlocalSet _folder="C:\TheGlenFTP\sendho"For /F %%A in ('dir /b /a %_folder%') Do ( Echo The folder is NOT empty goto :ok)xcopy C:\TheGlenFTP\combined\*.* c:\Holdsworth\Data\ /y /cxcopy C:\Holdsworth\Programs\xmit.ok C:\Holdsworth\Data\:ok