Batch folder delete with .ICT in folder name

February 16, 2011 at 00:13:44
Specs: Windows 7
Hi everyone,

I've just tarted learning how to write batch files for the purpose of work. At the moment I'm trying to delete every folder in C:\Users\ that has .ICT in the foldername.

For example someone.ICT.

I tried running this simple script but it didn't work, guessing because it think .ICT is the extension.

rd /s "C:\Users\*.ICT\*.*"
pause

As I said I'm new to this so if you know how to do this then please explain what each bit of the script does.

Thanks


See More: Batch folder delete with .ICT in folder name

Report •


#1
February 16, 2011 at 13:47:21
for /f %a in ('dir /b *.ict') do rd /s /q %a
this loop will check for the folders and delete

Subhash Chandra.


Report •

#2
February 16, 2011 at 23:55:49
Thanks, that works perfectly!

Report •

Related Solutions


Ask Question