On Jan 31, 2008, at 6:27 PM, Paul Rehill wrote:
> If I move all the files in a folder to another folder using
> folderitem.movefileto, is it best to cycle through a loop from the
> last item count to 1
>
> For j = iCountFoldItems downto 1
> SomeFolder.Item(j).movefileto SomeFolderElsewhere
> Next
>
> Counting the other way doesn't seem to work as it appears half the
> folderitems get moved as the item numbers of the files yet to be moved
> decrease accordingly.
>
> Is this right?
I prefer the following.
Function Items(extends f as FolderItem) as FolderItem()
dim theList() as FolderItem
for i as Integer = 1 to f.Count
dim f as FolderItem = f.Item(i)
if f is nil then
continue
end if
theList.Append f
next
return theList
End Function
for each item as FolderItem in parent.Items
item(i).MoveFileTo Somewhere
next
Charles Yeomans
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|