Batch File Script to move find and delete *.tif

Hello,

I am trying to write a batch file that will search a particular directory with sub-folders that have both .tif and .pdf's in them. My goal is to be able to run this script that can search a specific directory's sub-folders for all of the .tif files and delete them. Is this possible using a batch file script? Since all of the sub-folders are named differently I am unsure how to account for those variables.

Thanks to all in advance,

Whah
WhahAsked:
Who is Participating?
 
compaqusConnect With a Mentor Commented:
this is better :)
FOR /R C:\test\ %%i IN (*.tif) DO del "%%i"
0
 
compaqusCommented:
for /R c:\folder %i in (*.tif) do {command} %i
0
 
WhahAuthor Commented:
This worked excellent! Nice work and thank you very much for your help it is extremely appreciated.
0
 
compaqusCommented:
Glad to help!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.