PC Review


Reply
Thread Tools Rate Thread

deleting a million or so image files

 
 
Frank
Guest
Posts: n/a
 
      20th Apr 2004
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 With Quote
 
 
 
 
Pat [MSFT]
Guest
Posts: n/a
 
      21st Apr 2004
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" <(E-Mail Removed)> wrote in message
news:18b001c426d2$a7e90370$(E-Mail Removed)...
> 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 With Quote
 
Frank
Guest
Posts: n/a
 
      21st Apr 2004
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" <(E-Mail Removed)> wrote in

message
>news:18b001c426d2$a7e90370$(E-Mail Removed)...
>> 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 With Quote
 
Pat [MSFT]
Guest
Posts: n/a
 
      21st Apr 2004
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" <(E-Mail Removed)> wrote in message
news:21a901c42785$b77b9600$(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in

> message
>>news:18b001c426d2$a7e90370$(E-Mail Removed)...
>>> 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
From 3.5 Million to 9 Million in Four Days Alias Windows Vista General Discussion 14 18th Jan 2009 01:31 AM
More Than 30 Million of the Nation's 48 Million Population Carry Wireless Internet-Capable Cell Phones Knowing About Windows XP Networking 0 29th Jul 2006 07:44 PM
Deleting 1 Million Files from a folder Marauderz Microsoft Windows 2000 4 29th Jun 2006 12:02 AM
Deleting 15 GB size and 2.5 million items mailbox =?Utf-8?B?T3N3YWxkby4=?= Microsoft Outlook Discussion 1 9th Nov 2004 10:22 PM
Deleting Drive Image 7 v2i files Roger Smith Storage Devices 2 30th Dec 2003 01:14 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:17 AM.