Moving Files

Using Tcl, individual files or complete subtrees can easily be moved. Just set the parent field of the file concerned to the ID of the folder to which the file is to be moved:

CM>obj withId 4592 set parent 2001

This command moves the file with the ID 4592 to the folder with the ID 2001 (which is the base folder). Of course, you can also specify paths instead of IDs:

CM>obj withPath /internet/news set parent [obj root get id]

As with creating new files, the restrictions of the target folder apply when files are moved:

  • The file format of the file to be moved must be a valid format for files contained in the target folder.
  • The user who performs the action needs to have the administration permission for the file to be moved.
  • In the target folder, the user needs to have the permission to create files.