September 8th, 2003, 09:39 AM
Need help to script a simple bat file
I need help in making a simple bat file that can search a drive for certain file and perform action on the file. For example, I want it to search for a file named 'filename.txt' on my C drive and delete the file automatically. If any one knows, please post it here. Thanks.
September 8th, 2003, 09:42 AM
No bat required.
Type "dir /s *.* " where *.* is file name.
September 8th, 2003, 12:43 PM
yes, my good friend mark is correct... the "/s" switch (or argument) will usually search all files/folders/and sub-folders from the current dir.
example: if my prompt says "c:\winnt\" then that means that my current dir is "winnt". So make sure that you start in the top-most directory you want to search.
del filename.txt /s
yeah, I\'m gonna need that by friday...