Media_MoveItem ( source ; dest )
Media_MoveItem moves a file or folder to a new location.
Parameter | Description |
---|---|
source | The path to the folder or file to be copied. |
dest | A path to a folder. The source item will be copied to that folder using its source name. |
The source and dest parameters must be on the same volume.
Unlike Media_CopyItem, Media_MoveItem will not replace an existing item with the same name in the destination folder.
Examples
To move a file named “Tree Houses.doc” from the desktop to the root folder while storing any potential error into MyTable::Response:
Set Field [ MyTable::Response ;
Media_MoveItem ( ".D/Tree Houses.doc" ;
".R" ) ]
To move a file named “logo_thumb.jpg” from the default folder to a folder named “Images” on the desktop:
Set Field [ MyTable::Response ;
Media_MoveItem ( "logo_thumb.log" ;
".D/images" ) ]