mike-c
February 10th, 2005, 06:03 PM
Hi there
I would like to delete files, of the form *.txt, from within a directory tree. ie. a form of a recursive delete.
E.g. From within C:\data
there are multiple directories:
c:\data\john\data
c:\data\dave\data
..
c:\data\fred\data
and in each data directory there are files on the form xyz.txt, I need to define xyz as a wildcard, ie. *.txt
So I would like a batch file to sit in c:\data and delete any occurance of *.txt from any directory below it, without actually deleting any directories.
I'm thinking a DOS batch file is the way to go.
Any advice much appreciated.
Thanks
Mike
I would like to delete files, of the form *.txt, from within a directory tree. ie. a form of a recursive delete.
E.g. From within C:\data
there are multiple directories:
c:\data\john\data
c:\data\dave\data
..
c:\data\fred\data
and in each data directory there are files on the form xyz.txt, I need to define xyz as a wildcard, ie. *.txt
So I would like a batch file to sit in c:\data and delete any occurance of *.txt from any directory below it, without actually deleting any directories.
I'm thinking a DOS batch file is the way to go.
Any advice much appreciated.
Thanks
Mike