MoveFile command

The MoveFile command is used for moving your source file into a specified target directory. It is widely used as a Voicemail functionality when you would like to move your listened message into the 'old messages' directory.

Parameters

Parameter name Example value Description Mandatory
SourceFile D:/test.mp3 The file to be moved. yes
TargetDirectory D:/test/ The destination directory. yes

OzML example

This simple script iterates through the 'voicemails' array by using the ForEach command. At every iteration, the current item of the array will be moved to the directory that was provided in the TargetDirectory attribute.

<?xml version="1.0"?>
<Response>
    <ForEach source="voicemails">
        <MoveFile SourceFile="$item.message" TargetDirectory="$oldmessagepath"></MoveFile>
    </ForEach>
</Response>

More information