Need help to script a simple bat file
Results 1 to 3 of 3

Thread: Need help to script a simple bat file

  1. #1
    Senior Member Falcon21's Avatar
    Join Date
    Dec 2002

    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.

  2. #2
    Senior Member
    Join Date
    Jan 2003
    No bat required.

    Type "dir /s *.* " where *.* is file name.

  3. #3
    Senior Member tampabay420's Avatar
    Join Date
    Aug 2002
    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.

    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