How to move a folder (inc. contents)?

I need to move a folder (and it’s file contents) to a user selected destination.

I have looked at the FolderItem in the language reference, but I can only seem to find how to copy files from one location to another.
I also looked at MoveFileTo, but that also seems to be only for files, and not a full folder?

I need to MOVE a folder full of files, so that the original destination no longer exists.

Can someone please point me in the right direction.

Thank you.

did you try it with folders?

  dim f as FolderItem
  dim dlg as new SelectFolderDialog
  if f <> nil then
    if  f.Directory then
      f.MoveFileTo SpecialFolder.Desktop
    end if
  end if

Thanks - I presumed MoveFileTo was just for files, and not folders.
Just goes to show what presuming does :slight_smile:

[quote=106560:@Richard Summers]
Just goes to show what presuming does :)[/quote]

Computers have extremely limited abilities when it comes to presuming :wink:

a folder is more or less just a file with a special meaning.

The presuming was on my part - not the computer’s :slight_smile:
Silly me :slight_smile: