Solved

Batch File Script to move find and delete *.tif

Posted on 2010-09-08
5
452 Views
Last Modified: 2012-05-10
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
0
Comment
Question by:Whah
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 7

Expert Comment

by:compaqus
ID: 33630082
for /R c:\folder %i in (*.tif) do {command} %i
0
 
LVL 7

Accepted Solution

by:
compaqus earned 500 total points
ID: 33630216
this is better :)
FOR /R C:\test\ %%i IN (*.tif) DO del "%%i"
0
 

Author Closing Comment

by:Whah
ID: 33630543
This worked excellent! Nice work and thank you very much for your help it is extremely appreciated.
0
 
LVL 7

Expert Comment

by:compaqus
ID: 33630701
Glad to help!
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This tutorial will give you a fast look what you can do with WhizBase. I expect you already know how to work with HTML at least, and that you understand the basics of the internet and how the internet works. WhizBase is a server-s…
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question