Batch file for deleting files starting with IMG******

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Adam2012

Thread Starter
Joined
Apr 25, 2012
Messages
2
Hi all,

I am looking for some help creating a batch file to delete files starting with IMG******. They are always 6 randonmly genorated numbers after the IMG part. For example, they will be IMG000004, IMG000041 and IMG123500.

I have a removeable disk on E:\ that is set to have a daily backup backup to it, however, the software doesnt overwrite the IMG files correctly meaning the drive fills up and my backup fails.

So, how can I create a batch file that finds all of the folders starting with IMG and then deletes them from E:\

Thanks very much

Adam
 

Squashman

Trusted Advisor
Joined
Apr 4, 2003
Messages
19,786
You are contradicting yourself. First you said delete files starting with IMG and then you said delete folders staring with IMG?

If they are folders are these folders all in the Root of the E:\ drive?
E:\IMG000004
E:\IMG000041
 

Adam2012

Thread Starter
Joined
Apr 25, 2012
Messages
2
I meant folders not files. Yes, they are on the root so will be like:
E:\IMG000004 (Folder)
E:\IMG000041 (Folder)

Any help?
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Members online

Top