delete dir

  • Thread starter Thread starter fering
  • Start date Start date
F

fering

Hi,

Is there a way to delete a full dir instead of deleteing all files inside &
then delete the dir ?
using C++ or .net

Thanks
Danny
 
From a directory path above ...

rd /s Yourdir

Hold you breath and hang on! Or use My Computer or Explorer.
 
what i ment is using code not command line
& if there is a way just to delete the dir.
For example if it was possible just to delete the dir & not also the files
inside it can save
a lot of time becasue i have dirs with millions of small files.
 
Hi, Danny.

If you really delete just the directory and not the files within it, then
all the clusters those files occupy are not marked available for reuse. The
next time you run Chkdsk, you'll have TONS of lost clusters! Cleaning those
up would take a lot more time and letting rd get rid of them properly in the
first place.

RC
 
ok thanks

R. C. White said:
Hi, Danny.

If you really delete just the directory and not the files within it, then
all the clusters those files occupy are not marked available for reuse. The
next time you run Chkdsk, you'll have TONS of lost clusters! Cleaning those
up would take a lot more time and letting rd get rid of them properly in the
first place.

RC
--
R. C. White, CPA
San Marcos, TX
(e-mail address removed)
Microsoft Windows MVP
 
Use the previous suggestion of the command utility but put it in a
batch file. This way you can always use it in the future for the same
tree if it returns or modify the tree name in the batch script and
rerun the it to delete another tree.
 
Back
Top