Computing.Net > Forums > Disk Operating System > Batch File Required

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.

Batch File Required

Reply to Message Icon

Name: Sirius
Date: February 11, 2004 at 02:02:34 Pacific
OS: Win98SE
CPU/Ram: Pentium MMX 250/64
Comment:

Greetings....
I want to create a batch file which search all files with given extention on current directory and delete them....

I know how to search all file but dont know how to delete them ....
like Dir /s *.tmp
Thanks



Sponsored Link
Ads by Google

Response Number 1
Name: zintazu
Date: February 11, 2004 at 05:13:00 Pacific
Reply:

Please, post it in programming forum instead. :)


0

Response Number 2
Name: dudecybetron
Date: February 12, 2004 at 07:49:47 Pacific
Reply:

hi,

copy and paste the following code in a batch file and execute it.

@ echo off
dir /p *.%1
pause
del *.%1


the above code will search for the specified file with any extension of ur choice and it will delete them after listing it.

input:

batch file name followed by extension.


eg:

if u have named the file as kill.bat and u want to search the files with .exe extension then

u have to give

kill exe


0

Response Number 3
Name: Dan Penny
Date: February 13, 2004 at 18:49:52 Pacific
Reply:

Sirius, You have the same posting in the 9x forum;

http://www.computing.net/windows95/wwwboard/forum/155449.html

with a number of replies. Haven't you found an answer yet, or have you forgotton to go back there and look?


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


small DOS browser Get MAC Adr. without netw...



Post Locked

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


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: Batch File Required

batch file require variable or exit www.computing.net/answers/dos/batch-file-require-variable-or-exit/13004.html

alert tones in batch files. www.computing.net/answers/dos/alert-tones-in-batch-files/3264.html

how to find OS in batch file www.computing.net/answers/dos/how-to-find-os-in-batch-file/11085.html