I am now back to having a problem with copying bundles.

The code I'm using is from the LR, with the commented code having corrected
for a nilObject:

  Dim i as Integer
  Dim newFolder as FolderItem
  
  If source.directory then //it's a folder
    
    newFolder=destination //.child(source.name) This was creating a
nilObject.
    newFolder.createAsFolder
    
    For i=1 to source.count //go through each item
      If source.item(i).directory then
        //it's a folder
        CopyFileOrFolder source.item(i), newFolder
        //recursively call this
        //routine passing it the folder
      else
        source.item(i).CopyFileTo newFolder
        //it's a file so copy it
      end if
    next
  else //it's not a folder
    source.CopyFileTo destination
  end if
exception err as NilObjectException
  msgbox "Some NilObject Error occurred."

This behaves normally except when encountering a folder containing a bundle,
say an application. It is then creating the root folder, skipping the bundle
folder, and copying all the contents of the bundle into the higher level
folder.

All My Best,
Jeffrey
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to