Tom's Hardware > Forum > Windows 2000/NT > Windows 2000/NT General Discussion > deleting a million or so image files

deleting a million or so image files

Forum Windows 2000/NT : Windows 2000/NT General Discussion - deleting a million or so image files

Tom's Hardware: Over 1.4 million members in 6 different countries available to answer all your high-tech questions. Sign up now! Its free!
Word :    Username :           
 

Archived from groups: microsoft.public.win2000.file_system (More info?)

 

Does anybody know a fast way to delete about a million or
more image files sitting in a single windows 2000
directory. I'll have to do this on a weekly basis.

Normal windows explorer deletion is VERY slow (lots of
minutes to some hours!) and I've also tried a DOS batch
file, but its still very slow.

Are there any tools or tips to make this process quicker ?

Sponsored Links
Register or log in to remove.

Archived from groups: microsoft.public.win2000.file_system (More info?)

 

Can you delete the directory and re-create or is this a selective delete
(i.e. all file older than 'x' days get killed off)?

Explorer and a .bat job basically do the same thing:
1) FindFirstFile
2) Delete it
3) Get the next file.


Pat

"Frank" <anonymous@discussions.microsoft.com> wrote in message
news:18b001c426d2$a7e90370$a301280a@phx.gbl...
> Does anybody know a fast way to delete about a million or
> more image files sitting in a single windows 2000
> directory. I'll have to do this on a weekly basis.
>
> Normal windows explorer deletion is VERY slow (lots of
> minutes to some hours!) and I've also tried a DOS batch
> file, but its still very slow.
>
> Are there any tools or tips to make this process quicker ?

Reply to Anonymous
- 0 +

Archived from groups: microsoft.public.win2000.file_system (More info?)

 

Pat,

I could delete the directory and re-create it on a weekly
basis - (by the way I have this directory compressed to
save space).

Will this be any faster ??

From a batch file I could use RMDIR /S and then MKDIR and
COMPACT to recreate a compressed directory.

If I were to manually delete the directory using windows
explorer under win2K (i.e. highlight it and press <DEL> ) -
does it still have to delete all the files first?

I'm not sure how the actual mechanics of directory
deletion actually works in win2K ?

Frank.


>-----Original Message-----
>Can you delete the directory and re-create or is this a
selective delete
>(i.e. all file older than 'x' days get killed off)?
>
>Explorer and a .bat job basically do the same thing:
>1) FindFirstFile
>2) Delete it
>3) Get the next file.
>
>
>Pat
>
>"Frank" <anonymous@discussions.microsoft.com> wrote in
message
>news:18b001c426d2$a7e90370$a301280a@phx.gbl...
>> Does anybody know a fast way to delete about a million
or
>> more image files sitting in a single windows 2000
>> directory. I'll have to do this on a weekly basis.
>>
>> Normal windows explorer deletion is VERY slow (lots of
>> minutes to some hours!) and I've also tried a DOS batch
>> file, but its still very slow.
>>
>> Are there any tools or tips to make this process
quicker ?
>
>
>.
>

Reply to frank

Archived from groups: microsoft.public.win2000.file_system (More info?)

 

I thought that the rmdir /s would not iterate the files, but it does (my
mistake), but I think that it would still be faster than the explorer
mechanism (less overhead). The RemoveDirectory API only works on empty
directories, so that's out.

For the absolute fastest mechanism, you could create a volume that is
specific for the files and just do a quick format every week. That would
blow away the MFT, which would take only a few seconds. Then re-create the
folder/share (scripted) and you're good to go. This would also have the
side benefit of keeping volume fragmentation to a minimum.

One other thought that I have though is if the compression of the directory
is getting you very much relative to the induced overhead. If the images
are already in a compacted format (e.g. .jpg, mpeg, etc.) then the
compression won't be very much (a few percent) and you would definitely get
better throughput by turning it off. If, on the other hand the files are
..bmp/.tiff (or some other highly compressible format) it probably is worth
the additional overhead.


Pat


"Frank" <anonymous@discussions.microsoft.com> wrote in message
news:21a901c42785$b77b9600$a001280a@phx.gbl...
> Pat,
>
> I could delete the directory and re-create it on a weekly
> basis - (by the way I have this directory compressed to
> save space).
>
> Will this be any faster ??
>
> From a batch file I could use RMDIR /S and then MKDIR and
> COMPACT to recreate a compressed directory.
>
> If I were to manually delete the directory using windows
> explorer under win2K (i.e. highlight it and press <DEL> ) -
> does it still have to delete all the files first?
>
> I'm not sure how the actual mechanics of directory
> deletion actually works in win2K ?
>
> Frank.
>
>
>>-----Original Message-----
>>Can you delete the directory and re-create or is this a
> selective delete
>>(i.e. all file older than 'x' days get killed off)?
>>
>>Explorer and a .bat job basically do the same thing:
>>1) FindFirstFile
>>2) Delete it
>>3) Get the next file.
>>
>>
>>Pat
>>
>>"Frank" <anonymous@discussions.microsoft.com> wrote in
> message
>>news:18b001c426d2$a7e90370$a301280a@phx.gbl...
>>> Does anybody know a fast way to delete about a million
> or
>>> more image files sitting in a single windows 2000
>>> directory. I'll have to do this on a weekly basis.
>>>
>>> Normal windows explorer deletion is VERY slow (lots of
>>> minutes to some hours!) and I've also tried a DOS batch
>>> file, but its still very slow.
>>>
>>> Are there any tools or tips to make this process
> quicker ?
>>
>>
>>.
>>

Reply to Anonymous
Tom's Hardware > Forum > Windows 2000/NT > Windows 2000/NT General Discussion > deleting a million or so image files
Go to:

There are 724 identified and unidentified users. To see the list of identified users, Click here.

Please mind

You are about to answer a thread that has been inactive for more than 6 months.
If you still wish to proceed, please ensure that your posting is original and does not duplicate or overlap any prior responses to this thread.

Add a reply Cancel
Sponsored links
  • Ask the community now
  • Publish
Ad
They won a badge
Join us in greeting them
  • 01:00 demondrumer won the Freshman badge
  • 01:00 tehue won the Freshman badge
  • 12:11 mi1ez won the Watchman badge
  • 01:00 sighQ2 won the Freshman badge
  • 09:06 ulysses35 won the CPUs badge
  • 01:00 fleeb won the Freshman badge
  • 01:00 jaymoney61 won the Freshman badge
  • 07:06 amdfangirl won the Watchman badge
  • 01:00 benw won the Freshman badge
  • 01:00 anmjoven won the Freshman badge