|
Answer» Hi, I'm new to batch and CANT figure THINGS out by myself I need an equivalent for the WINDOWS search command. It has to accept any given AMOUNT of files(parameters?) to search for, and search in the entire data structure (hidden, system files) of a drive. I'd appreciate any help or a point in a good direction.Not sure if this will satisfy your question, but you could try DIR and FINDSTR ??
For more info:
DIR /?
FINDSTR /?
Hope that helps.Thanks for help CameronY Unfortunately, there are problems with these commands. I used DIR to create a list of files on a drive to process but that created a list with a path to the files - when I use FINDSTR on it it also searches trough the directories . any way to get just the files?
and another thing: a way to have infinite search parameteres..? -> to be able to give 10 or 100 words to search? would somekind of loop with SHIFT do the trick?With the DIR command, do the following:
DIR /B /A:HS %yourpath%\%filespec% or *
With the FINDSTR command, don't use the /S option as it invokes a recursive search through any sub-directories.
Edit: Wrong para's in initial post.Quote and another thing: a way to have infinite search parameteres..? -> to be able to give 10 or 100 words to search? would somekind of loop with SHIFT do the trick? If you can identify the use of SHIFT, read up on the use and then play with it - you will find yourself a solution. It's the best way to learn and understand what exactly you are doing.
Le us KNOW how you go. Show us your script if/when you get into any difficulties.
|