I have a batch file to map a server to a "x" drive
Then to search folders called user1 user2... Upto user7,
This might get more directories over a few months etcetc
For a folder named after the user which I prompt to search for
Say bloggsp5 is the name...
It searches user1 by the pushd command and popd back if not found
And pushd to the next folder...
Then I have returned a echo saying bloggsp5 was found in section-IT\user4\...
Now my batch file is very very long and hard to look at
(have many "sections-agencies" ie... IT Or HR...)
I hope this is understandable?
Can this be done in a for loop? That's my question,
instead of having a bat file ten miles long?
Oh and I use CLIP.EXE to paste to clipboard to paste in notepad the findings...
I don't know if that can work also ?