Script Function: Moves an object to a folder.


MOVE_OBJECT (Object Name, Destination Folder)



Object Name

The name of the object.
Format: script literal or script variable

Destination Folder

The path of the folder in which the object should be moved.
Format: script literal or script variable

Return codes

"0" - The object was successfully moved.
"20645" - This object does not exist.
"20657" - The target folder does not exist.


It is irrelevant in which folder the object that should be moved is stored because it will be retrieved automatically. Existing object links are ignored and will not be moved.

 You need writ access (W) to the object and the target folder as otherwise, a runtime error occurs.

When the object or the folder do not exist, a runtime error will occur if the script statement :ON_ERROR was used with the parameter ABEND. If the folder does not exist, the object remains in its original folder.

This script statement causes all the script's open transactions to be written to the AE database.


The following example moves the object VIENNA to the sub-folder OBJECTS of the folder TIME_ZONES.


See also:

Script element Description


Determines the reaction to certain errors and messages of script elements.


Creates an object (Calendar, Login and Variable only).

REMOVE_OBJECT Deletes an existing object.
MODIFY_OBJECT Changes an existing object (only Calendar, Login and Variable).

Script Elements - Handling Objects
Script Elements - Error Handling and Messages

About Scripts
Script Elements - Alphabetical Listing

Script Elements - Ordered by Functions