Programmatically setting Parent to FolderItem

How can change in an App, without a dialog, the parent to a file? Also the file would not yet exist.
I have a default file/template that loads, but I want it to be saved to the app’s “special folder”.
Parent is of course locked.

You create a new FolderItem in the target folder using the properties of the source FolderItem. Something like:

f = newFolder.Child( origFile.Name )

Thanks. I also found examples under folderitem