Solved

Batch File Script to move find and delete *.tif

Posted on 2010-09-08
5
441 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
  • 3
5 Comments
 
LVL 7

Expert Comment

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

Expert Comment

by:Daniel Junges
ID: 33630110
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

The following is a collection of cases for strange behaviour when using advanced techniques in DOS batch files. You should have some basic experience in batch "programming", as I'm assuming some knowledge and not further explain the basics. For some…
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 create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

747 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now