I have files of identical filenames and file extensions (say *.txt) created in different folders in a drive, and I need to extract only the latest version of all these files from those folders and put them into a single folder in another drive. I can use robocopy to copy all latest files to an identical hierachy of folders on the destination drive, but not a single folder I wanted, by typing following on the command line
Robocopy c:\txt d:\txt /xo
What I wanted is to copy all *.txt files from all subfolders in say Drive C: to a single folder on drive D: say d:\txt. In other words, I would like to see any subfolders created at D:\txt at all. What I wanted is only files with the latest date marks on them.
I will be grateful if someone would suggest a bat file that could use robocopy to achieve what I wanted.
Regards
Matehk Marco