No, lastErrorCode on f2 is always 0.
- Kimball
http://www.kimballlarsen.com
On Mar 31, 2009, at 12:14 PM, Arnaud Nicolet wrote:
Le 31 mars 09 à 20:09, Kimball Larsen a écrit:
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)
f2.Delete
next
f.delete
Prior to the delete, the directory contains the following files:
bottle101.png
bottle202.png
bottle207.png
bottle404.png
facts101.png
facts202.png
facts207.png
facts404.png
bottle102.png
bottle204.png
bottle302.png
bottle502.png
facts102.png
facts204.png
facts302.png
facts502.png
bottle105.png
bottle205.png
bottle304.png
bottle508.png
facts105.png
facts205.png
facts304.png
facts508.png
bottle201.png
bottle206.png
bottle402.png
bottle510.png
facts201.png
facts206.png
facts402.png
facts510.png
After the delete, it contains these:
bottle102.png
bottle206.png
bottle402.png
bottle508.png
facts201.png
facts302.png
facts404.png
facts510.png
bottle201.png
bottle302.png
bottle404.png
bottle510.png
facts204.png
facts304.png
facts502.png
bottle204.png
bottle304.png
bottle502.png
facts102.png
facts206.png
facts402.png
facts508.png
So, it's deleting some of them, but not all.
What gives?
Is the folderitem.LastErrorCode showing a value other than 0 after
the delete method is called? It would be a good tip.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|