Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 458
  • Last Modified:

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
0
Whah
Asked:
Whah
  • 3
1 Solution
 
compaqusCommented:
for /R c:\folder %i in (*.tif) do {command} %i
0
 
compaqusCommented:
this is better :)
FOR /R C:\test\ %%i IN (*.tif) DO del "%%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

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now