Monday, April 27, 2015

Searching for files within a number of folders in command line in Windows 10

I'm trying to find the proper syntax for finding all the files with a specific name that are in a multitude of folders. So - I have a directory with 100+ folders, in each folder there are files that are uniquely named but have a similar string in each name (AC_DATA). I want to find the names and directories of all those AC_DATA* files. I've tried many combinations, this one works if I have the name of the folder:



dir -r C:\DATA[foldername] /b | findstr /s /i AC_DATA*



but this does not work when I want to find all the files that are in those folders. I need to find these files while not being in the C:\DATA\ directory. I can do this in Windows 7 and unix but 10 is stumping me.

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...