Solved

Batch File Script to move find and delete *.tif

Posted on 2010-09-08
5
450 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 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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

If you get a (Blue Screen of Death), your system writes a small file called a minidump. Your first step is to make certain your computer is setup to record memory dumps. Right click My Computer, choose properties. Click on the advanced tab, an…
Making a simple AJAX shopping cart Couple years ago I made my first shopping cart, I used iframe and JavaScript, it was very good at that time, there were no sessions or AJAX, I used cookies on clients machine. Today we have more advanced techno…
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 …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

735 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