Le 31 mars 09 à 20:15, Andy Dent a écrit:
On 01/04/2009, at 2:09 AM, Kimball Larsen wrote:
Has anyone noticed any problem with folderitem.delete where it
deletes some files, but not others?
Here's the background: I'm trying to empty a directory that I
created to hold some temporary images. Here is the code I'm using
to delete:
dim f as FolderItem = specialFolder.Temporary.child("ah")
dim f2 as folderItem
dim i as integer
for i = 1 to f.Count
f2 = f.item(i)
use item(0) here always, not item(i)
item(1), in fact.
You want to delete f.Count files. As you delete them, the effect of
the item call changes.
I thought of that, but it's not clear. If it was the whole cause, you
would delete half the files and, in his example, there are less than
half of the files being deleted.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|