PDA

View Full Version : File Copy Count


JXBURNS
03-01-2007, 03:03 PM
Is there a function similar to Zip.GetContents that will tell me the count of files in a folder tree? I thought there was but maybe I am confused with a competing product (wash my mouth out:o )

Basically I want to include the file x of y text in a callback being used to backup one folder to another as there are over a 1000 files to copy. The progress bars are OK but the users are complaining the bars move too slowly on the overall progress line even though the single file progress zips along.:rolleyes

Thanks - John

Adam
03-01-2007, 03:25 PM
I don't think there is a similar function for files. You could use a File.Find() and then a Table.Count() to get the number of files but you would need to keep an eye on performance.

Adam Kapilik

JXBURNS
03-02-2007, 01:59 AM
Thanks Adam,

That was the one I was looking for - I kept typing in a Visual Basic command and wondering why it did not work - I must try better in future.:eek:

I triied with 1200+ files and performance was fine primarily because I'm not using any callbacks in the File.Find, no recursion and purely searching for *.*.

Rgds John