Re: How to empty a folder tree?
Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance
Poprivet wrote:
John John wrote:
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
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.
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
.
Relevant Pages
- Re: xp_cmdshell default path (system32) problem
... purge all files from a given directory. ... that xp_cmdshell ALWAYS executes under the security context of defined ... I'm use xp_cmdShell to execute "erase" command like ... I haven't executed the actual erase statements yet but rather have been ... (microsoft.public.sqlserver.programming) - Re: basic command pipe question
... =>to erase a bunch of files in one go. ... will execute a seperate process for *EACH* file to be deleted and would potentially overflow before the for loop even starts. ... Although, if I understand properly what's happening here, the pipe solution allows files to be erased as they are found in the filelist, while the gobbing method first requires that all files that match be found, then each command is executed one after another. ... (Fedora) - Re: xp_cmdshell default path (system32) problem
... I'm use xp_cmdShell to execute "erase" command like commands to delete the files. ... I haven't executed the actual erase statements yet but rather have been running test where I just perform a DIR instead of a ERASE to confirm what WILL get deleted when I do it for real. ... The problem is, if the directory that I supply doesn't exist, then the command appears to opporate on the "default path". ... However, this doesn't protect me later when my script is running as a scheduled job and some unssuspecting sole happens to delete, rename or change the security settings on my directory and now the next time the job runs I crush SYSTEM32! ... (microsoft.public.sqlserver.programming) - Re: [PATCH 1/2] fs: Do not dispatch FITRIM through separate super_operation
... Ted Ts'o wrote: ranges in one command are any better than the ranges sent N times ... ... the same amount of erase overhead gets sent on SSDs. ... in your conclusion that it is because the drive is doing slow flash ... (Linux-Kernel) - Re: xp_cmdshell default path (system32) problem
... I'm use xp_cmdShell to execute "erase" command like commands to delete the files. ... I haven't executed the actual erase statements yet but rather have been running test where I just perform a DIR instead of a ERASE to confirm what WILL get deleted when I do it for real. ... The problem is, if the directory that I supply doesn't exist, then the command appears to opporate on the "default path". ... However, this doesn't protect me later when my script is running as a scheduled job and some unssuspecting sole happens to delete, rename or change the security settings on my directory and now the next time the job runs I crush SYSTEM32! ... (microsoft.public.sqlserver.programming) |
|