bool MoveFile(string, string)

Moves or renames a file

Security

Trust Level Required: Full Trust

Parameters

Name Description
from string
The old path of the file.
to string
The new path of the file.

Return

True upon success, and false if the file did not exist.

Remarks

The kiosk user must have sufficient permissions to perform any file IO operation that performs a read or write operation on the current disk.

Examples


var sampleFile = KioApp.DoUrlSubstitution('$$KIO_USERDATA$$') + 'sampleFile.txt';
var sampleFile2 = KioApp.DoUrlSubstitution('$$KIO_PROGDATA$$')  + 'sampleFile2.txt';
if(KioFileIO.CreateFile(sampleFile))
    var directoryInfo = KioFileIO.MoveFile(sampleFile, sampleFile2);
else KioFileIO.MoveFile(sampleFile, sampleFile2);
    

Requirements

KioWare for Windows version 8.5 or greater.