I have the following in a .bat
. I am trying to pull the most recent file (as the file name changes each time a new file is generated) from a network drive and copy it to a folder on my desktop changing the name so I can hit it from an outside DB. Unfortunately I am relatively new with .bat
files and cannot figure out how to pull the latest file instead of the defined file below. I will turn this around and put it into a task scheduler to pull the file every thirty minutes.
copy \\fipr01\SNAP\P161201135302673.tmp C:\Users\ddtacopy\Desktop\AutoCopy\SNAP.txt