Folder Item Constructor

Does someone have an example of FolderItem.Constructor(path as String) being used? I keep getting bugs on mine.

[code]file = dialog.ShowModal
dim path as string

If file <> Nil Then
path = file.AbsolutePath

SaveLocation = FolderItem.Constructor(path ,0)

else

MsgBox("Folder was not selected. Save Cancled.")

End If
[/code]

Thank you all so much.

Yeah dont do that :stuck_out_tongue:

file = dialog.ShowModal

  If file <> Nil Then
    SaveLocation = file
  else

    MsgBox("Folder was not selected. Save Cancled.")

  End If

file IS where the user selected so you dont need to go create a new one

Better use Nativepath rather than Absolutepath, which has been deprecated.

The dialog returns the selected location so there’s no need to go create a new folderitem that refers to the exact same location from the path you already have
Get rid of that code entirely

ABORT!

Code was deleted as Norman suggested and it worked.

There I go over complicating things again…

Thanks guys.