Quantcast
Channel: Windows 7 Miscellaneous forum
Viewing all articles
Browse latest Browse all 11372

Using Robocopy to copy latest file

$
0
0

1-IncomingData folder has new text files written daily.

I would like Robocopy, (and I would like to run it in a .bat file) - when I run it the first time as it were, to check the 1-IncomingData folder for the newest/most recent file.  Then copy that file to the 2-NewestData folder.  When I run the script again, I want it to be able to look inside the 1-IncomingData folder and see if the file that it had already copied is in the same as the one in the 2-NewestData folder - if it is, then empty the 2-NewestData folder.  When I run the script again, I want it to keep the 2-NewestData folder empty -until- a more recent file is found in the 1-IncomingData folder.

As you can probably tell, ,my goal is to use a script which looks inside the 2-NewestData folder and if it sees a file in there I want it to be able to use that file etc...


Viewing all articles
Browse latest Browse all 11372

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>