Computing.Net > Forums > Windows XP > Deleting files using a .bat

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Deleting files using a .bat

Reply to Message Icon

Name: AJ_Letson
Date: February 14, 2008 at 08:29:46 Pacific
OS: XP Pro ver 2002 SP2
CPU/Ram: 450MHz, 256MB
Product: Gateway E-3200
Comment:

I'm trying to write a .bat file (under WinXP) that will search for files containing a certain string (for example, if the words "hello there" are found within the file) and then delete those files. I need to be able to search all available drives.

General outline:

IF EXIST A:\ -> search A:\ for files containing string, then delete those files
repeat for B:\ to Z:\

Hopefully this makes sense. Thanks in advance for your help!



Sponsored Link
Ads by Google

Response Number 1
Name: wanderer
Date: February 14, 2008 at 10:01:23 Pacific
Reply:

You would be amazed at what comes up if you google batch file and string.

Imagine the power if you knew how to internet search


0

Response Number 2
Name: AJ_Letson
Date: February 14, 2008 at 10:18:20 Pacific
Reply:

Thanks for the hint on search terms. I *did* search first, but couldn't find anything.

...Used your search terms, but not sure what I'm looking at. Went to the first page, but it was confusing. (I'm kinda a beginner in .bat files.)


0

Response Number 3
Name: Wombat
Date: February 14, 2008 at 13:04:18 Pacific
Reply:

If your a kinda beginner in .bat files perhaps you will have a better learning experience in the Programming forum...

http://computing.net/programming/ww...


0

Response Number 4
Name: wanderer
Date: February 14, 2008 at 16:04:09 Pacific
Reply:

Batch file how to's
Batch file guide

????? if you can't use those you need to google batch file basics and start your education there.

Are you ready for where Microsoft wants you to go today?


0

Response Number 5
Name: AJ_Letson
Date: February 15, 2008 at 21:13:21 Pacific
Reply:

Thanks guys. Really appreciate the help.


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows XP Forum Home


Sponsored links

Ads by Google


Results for: Deleting files using a .bat

How to remove Attribs with a .bat www.computing.net/answers/windows-xp/how-to-remove-attribs-with-a-bat/180717.html

Delete Files Older Then x-Days v.2 www.computing.net/answers/windows-xp/delete-files-older-then-xdays-v2/171309.html

help writing a bat file www.computing.net/answers/windows-xp/help-writing-a-bat-file/172090.html