Copy the latest file with a particular file extension

ITLsupport
ITLsupport used Ask the Experts™
on
Great little piece of code by Paul Tomasi

http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/MS_DOS/Q_24183952.html

just remember to use

copy "%latestfile%" c:\towherethefilesgo\
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Bill PrewTest your restores, not your backups...
Top Expert 2016

Commented:
What is the question?

~bp
robocopy will copy the most up-to-date file from a source to a destination.

robocopy <source> <destination> /MIR /R:0

Make sure you practice this in a test environment before implementing it. You can find more info on switches here:

robocopy /?
Wowee!! I didn't expect that!

ITLsupport
Thank you for mentioning me :)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial