-
September 8th, 2003, 08:39 AM
#1
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, 08:42 AM
#2
No bat required.
Type "dir /s *.* " where *.* is file name.
-
September 8th, 2003, 11:43 AM
#3
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.
Code:
c:
cd /
del filename.txt /s
yeah, I\'m gonna need that by friday...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|