Recursive subdirectory search and action

Recursive subdirectory search and action

Post by Jonathan de Boyne Pollar » Tue, 22 Jul 2003 23:56:44



PG> I'm trying to write a script that recursivly checks sub
PG> directories of a folder and if they are empty, writes a
PG> blank dummy.txt file to it.

An easier thing to do would be to ensure that all directories contain a
"dummy.txt" file.  Here's a 4NT or TCWIN32 one-liner that (presuming that the
current directory has already been changed to be the top-level directory in
the hierarchy) does that:

        GLOBAL /I TOUCH /C DUMMY.TXT

 
 
 

1. Need: Recursive directory search of all files for specified text

I need to do this in a batch file:

Find all files with the specified text in all files of the current directory
and all its child directories.

For example: Entering at command line "lookfor ducks" would find all
files with the word ducks in the currrent directory and all directories
below it using the file lookfor.bat.

attrib /v finds all directories
find      will find specified text for specified directory
for       might be the needed loop to accomplish this

Thank you

Alan Watts                        Preparation is everything.  

UUCP:  ...!emory!pd.org!alan             Less is more.  

2. recvbufs errors

3. Recursive directory search of all files for specified text

4. Wanted: Good DTMF Decoder Schematic With Display

5. Recursive Directory Search Algorithm

6. Trakball price

7. Is it possible to search subdirectories from the command line....

8. ntp for pSOS+

9. search string in subdirectories

10. Search in subdirectories Long filnames.

11. WANTED: Code to search DOS directory/subdirectories

12. DOS file search program that searches all drives

13. MSDOS-search the web quickly with Search Spaniel