wild cards for folders in Win 7 batch file

Joined
Jun 21, 2011
Messages
1
Reaction score
0
I have a 1/4 million folders to search through for all the instances of a folder called "Record drawings n Documents", once found I need to DIR the folder & content using /s /b to give a bare format & recurs through all the files folders downstream & then use >> to add the findings to a txt file.

unfortunately my knowledge of DOS is light, so I've quickly got stuck...I've got this far, but it doesn’t work...


@echo off

for /d %%a in (Record drawings n Documents) do Dir "%%a" >> "C:\Users\ben\Desktop\New folder\test.txt" /s /b


Pause

I can get the search to work on a single word but not Record drawings n Documents and I can get the /s switch to work but I can’t make it report anything other than just the folder I was searching on.

Help!

Thanks in advance

Dibbler
 
Last edited:

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top