Re: "del /s foo*" doesn't work
"Roof Fiddler" wrote:
> So, even though "del /s bar" returns no error message, neither bar nor its
> contents (baz) are actually deleted.
This is driving me crazy too. I have the exact same problem in both Vista
AND XP and really need an answer from someone smarter than me...
What's most frustrating is that the del command help states "Wildcards may
be used to delete multiple files. If a directory is specified, all files
within the directory will be deleted." But it simply doesn't happen.
The best I have come up with so far is to copy DELTREE command into the
system and use the following batch file to creates a list of the directories
you want to delete:
dir /s BAR /a /b /-p /o:GEN >"C:\Documents and Settings\%USERNAME%\Local
copy "C:\Documents and Settings\%USERNAME%\Local Settings\Temp\dirlist.txt" %1
del "C:\Documents and Settings\%USERNAME%\Local Settings\Temp\dirlist.txt"
and then turn that "dirlist.txt" into a .bat file with the 'deltree' command
in front of each line in quotes. Run it and voila!
(Very oldschool, but at least it works.)