Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsWindows VistaWindows XPWindows MeWindows 98Windows 95Virtual PCInternet ExplorerOutlook ExpressWindows MediaSecurity
Related Topics
MS Server ProductsMS OfficePC HardwareMore Topics ...

Windows Forum / Windows XP / Basics / April 2007

Tip: Looking for answers? Try searching our database.

How to empty a folder tree?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ricardo.l - 30 Apr 2007 15:54 GMT
It would be useful to me learning how I can delete files from some base
folder including all its subfolders, but keeping the folder structure, so I
dont have to recreate them every time I backup and cleanup.

Every other method, I cant think of,  to achieve the goal is fine to me as
well, of course.

thank you
ric
John John - 30 Apr 2007 16:54 GMT
From the Command Prompt navigate to the first directory in the tree and
issue:

del *.* /s /q

Be certain that you are in the right directory!  It will erase all the
files from the directory in which the command was issued on down!  The
files will be permanently deleted, del does not use the Recycle Bin!

John

> It would be useful to me learning how I can delete files from some base
> folder including all its subfolders, but keeping the folder structure, so I
[quoted text clipped - 5 lines]
> thank you
> ric
Poprivet - 30 Apr 2007 17:10 GMT
> From the Command Prompt navigate to the first directory in the tree
> and issue:
[quoted text clipped - 6 lines]
>
> John

In XP Pro you don't need either of the switches.  Just    del *.*    in the
highest level directory will do it.  It surprised me, but it worked, and of
course left all the subdirectories in place.  The switches don't hurt
anything, of course.
  I don't care for /Q personally, because I like the 'Are you Sure'
reminder  message.

HTH
Pop`

>> It would be useful to me learning how I can delete files from some
>> base folder including all its subfolders, but keeping the folder
[quoted text clipped - 5 lines]
>> thank you
>> ric
John John - 30 Apr 2007 17:38 GMT
>>From the Command Prompt navigate to the first directory in the tree
>>and issue:
[quoted text clipped - 13 lines]
>    I don't care for /Q personally, because I like the 'Are you Sure'
> reminder  message.

I find it surprising that on your XP Pro  del *.*  without any switches
would erase files in subfolders!  The expected results of the command is
that it erases all the files in the current directory only.  It would
also surprise me that this would be specific to XP Pro but not XP Home.
 I wonder if any other users here are seeing the same behaviour with
the command.  I can't verify right now but maybe other users could give
us their results.  It seems to me it would be a bug if it behaves that way!

John
ricardo.l - 30 Apr 2007 21:12 GMT
> >>From the Command Prompt navigate to the first directory in the tree
> >>and issue:
> >>
> >>del *.* /s /q

Oh Thanks John, it worked fine!
Also, in my xp pro there is no bug: the switch is needed.
I'd also keep the /q switch, it's safer and prevents from hurrying too much...
Regards,
Ricardo
John John - 30 Apr 2007 22:09 GMT
>>>>From the Command Prompt navigate to the first directory in the tree
>>>
[quoted text clipped - 5 lines]
> Also, in my xp pro there is no bug: the switch is needed.
> I'd also keep the /q switch, it's safer and prevents from hurrying too much...

You're welcome.  Thanks fo the follow up.

John
Poprivet - 30 Apr 2007 21:38 GMT
...

> I find it surprising that on your XP Pro  del *.*  without any
> switches would erase files in subfolders!  The expected results of
[quoted text clipped - 6 lines]
> that way!
> John

You're right, of course!  My bad, and a big blunder at that!
    It happened as I said it did, but ... because I had set the environment
variables!  So, I CAN reproduce it, but ... only by setting those same
variables again.  My bad!

Actually I'm kicking myself for being so stupid because I work at the
Command Prompt all the time and obviously wasn't paying attention because I
know better!!  Won't happen again; I hope!!!
  So much for "proofing" it before I posted.

Regards,

Pop`
John John - 30 Apr 2007 22:18 GMT
> ...
>
[quoted text clipped - 18 lines]
> know better!!  Won't happen again; I hope!!!
>    So much for "proofing" it before I posted.

I kind of thought that something wasn't right, I thought for sure that
something was wrong with your XP installation.

John
SingaporeWebDesign - 30 Apr 2007 19:38 GMT
Hello,

Perform an empty search on the folder, sort by type (folders will go to
top), select all the files by selecting the first file item and then hitting
shift-end to select, hit delete.

Signature

Singapore Website Design
http://www.bootstrike.com/Webdesign/
Singapore Web Hosting
http://www.bootstrike.com/WinXP/faq.html
Windows XP FAQ

> It would be useful to me learning how I can delete files from some base
> folder including all its subfolders, but keeping the folder structure, so
[quoted text clipped - 6 lines]
> thank you
> ric
ricardo.l - 30 Apr 2007 21:14 GMT
> Hello,
>
> Perform an empty search on the folder, sort by type (folders will go to
> top), select all the files by selecting the first file item and then hitting
> shift-end to select, hit delete.

Nice method, unless the number of files is too large...I dont like to wait
for hard drive scanning and select 10.000 files or more...beside that I'll
keep it in mind, good trick.
Thank you so much. Bye,
Ricardo
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.