Saturday, January 3, 2015

script - Search for most recent file under a directory and copy the folder containing it to another directory

In my directory I have many files with the same name also in many other subdirectories



example file structure:




C:\a\first\hello.txt
C:\a\second\hello.txt
C:\a\third\hello.txt





I need to specifically search for the most recently modified 'hello.txt' (as there are also other files in the directory) and copy its containing folder to C:\b



Am very new to batch so explanations would be fantastic :)

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...