weird issue with "del" command

Red Squirrel

No Lifer
May 24, 2003
69,237
13,005
126
www.anyf.ca
I'm executing this command on a system to delete all the temp files but for some reason it's ignoring the folders:

del /f /s /q *.*

I'm in the folder I want to delete everything from.

For whatever reason it does not do the subdirectories. If I remove /q it does, but I can't sit there all day hitting Y key. Has anyone seen this happen before? This is windows xp.
 

Fardringle

Diamond Member
Oct 23, 2000
9,200
765
126
Try using the RMDIR command instead. The syntax is RMDIR /s /q <folder name>. You can replace RMDIR with RD if five characters are too many to type. ;)

So if you want to delete all files and all subfolders in a folder named "Temp", use: RMDIR /s /q temp. This has the same effect as deltree.
 

Red Squirrel

No Lifer
May 24, 2003
69,237
13,005
126
www.anyf.ca
No luck with athat either but it turned out the order of the del parameters matters. I can't recall the order that worked now though. Windows command prompt is messed. Prefer Linux. That and I always do rm -rf * then realize that wont work :p
 

chronodekar

Senior member
Nov 2, 2008
721
1
0
Originally posted by: RedSquirrel
No luck with athat either but it turned out the order of the del parameters matters. I can't recall the order that worked now though. Windows command prompt is messed. Prefer Linux. That and I always do rm -rf * then realize that wont work :p

I lost count how many times I typed in "ls" in my XP command prompt before realizing what OS I was in !! :)