A Windows Vista forum. Vista Banter

Welcome to Vista Banter.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to ask questions and reply to others posts, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

Go Back   Home » Vista Banter forum » Microsoft Windows Vista » Windows Vista File Management
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Windows Vista File Management Issues or questions in relation to Vista's file management. (microsoft.public.windows.vista.file_management)

"del /s foo*" doesn't work



 
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old October 27th 06, 12:36 PM posted to microsoft.public.windows.vista.file_management
Roof Fiddler
external usenet poster
 
Posts: 121
Default "del /s foo*" doesn't work

What's the command-line command to recursively delete all files and
directories with names beginning with "foo"?
"del /s foo*" doesn't work.

Doing it using the GUI, with Start/Search and searching for "name:foo" and
then selecting all and choosing "delete", doesn't work, because I have
hundreds of such directories, and for each one Vista will grind away on my
disk for a couple minutes and then give me a bogus "This folder is shared
with other people--If you delete this folder, it will no longer be
shared.--Continue or Cancel" message and make me press "Continue" before it
will grind away for another couple minutes and give me another bogus message
for the next folder, and there's no "Yes to All" button, so I have to sit
for hours babysitting the machine and pressing "Continue" over and over in
order to delete all the directories.
So until MS fixes that bug, I need to do it from the command line.

So what's the command to do it?

  #2 (permalink)  
Old October 28th 06, 10:51 AM posted to microsoft.public.windows.vista.file_management
DMB
external usenet poster
 
Posts: 16
Default "del /s foo*" doesn't work

Did you try doing this while running the command prompt as Administrator?

-- Dave

"Roof Fiddler" wrote in message
...
What's the command-line command to recursively delete all files and
directories with names beginning with "foo"?
"del /s foo*" doesn't work.

Doing it using the GUI, with Start/Search and searching for "name:foo" and
then selecting all and choosing "delete", doesn't work, because I have
hundreds of such directories, and for each one Vista will grind away on my
disk for a couple minutes and then give me a bogus "This folder is shared
with other people--If you delete this folder, it will no longer be
shared.--Continue or Cancel" message and make me press "Continue" before
it will grind away for another couple minutes and give me another bogus
message for the next folder, and there's no "Yes to All" button, so I have
to sit for hours babysitting the machine and pressing "Continue" over and
over in order to delete all the directories.
So until MS fixes that bug, I need to do it from the command line.

So what's the command to do it?


  #3 (permalink)  
Old October 29th 06, 06:07 AM posted to microsoft.public.windows.vista.file_management
Roof Fiddler
external usenet poster
 
Posts: 121
Default "del /s foo*" doesn't work

"DMB" wrote in message
...
Did you try doing this while running the command prompt as Administrator?

That shouldn't be necessary, since the logged-in user owns the files and
folders in question.

  #4 (permalink)  
Old October 29th 06, 02:58 PM posted to microsoft.public.windows.vista.file_management
Kerry Brown
external usenet poster
 
Posts: 2,887
Default "del /s foo*" doesn't work

You're right it shouldn't be necessary but did you try it? Vista is still a
beta and may have bugs. Running an elevated cmd prompt is a valid test to
see if there are some permissions issues or maybe a bug.

--
Kerry
MS-MVP Windows - Shell/User
http://www.vistahelp.ca


Roof Fiddler wrote:
"DMB" wrote in message
...
Did you try doing this while running the command prompt as
Administrator?

That shouldn't be necessary, since the logged-in user owns the files
and folders in question.



  #5 (permalink)  
Old October 29th 06, 06:06 PM posted to microsoft.public.windows.vista.file_management
Jimmy Brush
external usenet poster
 
Posts: 827
Default "del /s foo*" doesn't work

I tried this on my system and it worked fine. Can you give more information
as to what files you are trying to delete and what response you are getting
from the command prompt?


--
- JB

Windows Vista Support Faq
http://www.jimmah.com/vista/

  #6 (permalink)  
Old November 1st 06, 05:23 PM posted to microsoft.public.windows.vista.file_management
Roof Fiddler
external usenet poster
 
Posts: 121
Default "del /s foo*" doesn't work

"Jimmy Brush" wrote in message
...
I tried this on my system and it worked fine. Can you give more information
as to what files you are trying to delete and what response you are getting
from the command prompt?


I open cmd.exe as administrator, and:

C:\Windows\system32mkdir foo
C:\Windows\system32mkdir foo\bar
C:\Windows\system32mkdir foo\bar\baz

C:\Windows\system32dir /s bar
[snip]
Directory of C:\Windows\system32\foo
11/01/2006 10:05 AM DIR bar
0 File(s) 0 bytes
[snip]
C:\Windows\system32dir /s baz
[snip]
Directory of C:\Windows\system32\foo\bar
11/01/2006 10:06 AM DIR baz
0 File(s) 0 bytes
[snip]

C:\Windows\system32del /s bar

C:\Windows\system32dir /s bar
[snip]
Directory of C:\Windows\system32\foo
11/01/2006 10:05 AM DIR bar
0 File(s) 0 bytes
[snip]
C:\Windows\system32
C:\Windows\system32dir /s baz
[snip]
Directory of C:\Windows\system32\foo\bar
11/01/2006 10:06 AM DIR baz
0 File(s) 0 bytes
[snip]

So, even though "del /s bar" returns no error message, neither bar nor its
contents (baz) are actually deleted.
Yes, I know how to actually get rid of bar and baz in this case. The problem
is that I might have many directories named "bar" scattered throughout
various other subdirectories of my current directory, and I need a single
command which, when run from my current directory, will delete all of them
and their contents.

  #7 (permalink)  
Old December 28th 06, 01:06 AM posted to microsoft.public.windows.vista.file_management
Eddie The 'Ead
external usenet poster
 
Posts: 1
Default "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:

cd %1
dir /s BAR /a /b /-p /o:GEN "C:\Documents and Settings\%USERNAME%\Local
Settings\Temp\dirlist.txt"
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.)
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 03:43 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.Search Engine Optimization by vBSEO 3.0.0 RC6
Copyright ©2004-2024 Vista Banter.
The comments are property of their posters.