File_MoveFile
Description
Section titled “Description”Moves a file from source to a destination
Syntax
Section titled “Syntax”File_MoveFile(sSourceFile, sTargetFile, bOverWrite) As Boolean
Parameters
Section titled “Parameters”sSourceFile (String)
Section titled “sSourceFile (String)”File to move
sTargetFile (String)
Section titled “sTargetFile (String)”Name of target file
bOverWrite (Boolean)
Section titled “bOverWrite (Boolean)”Overwrite existing file. If True, an existing target file is deleted, also if it’s read-only, before the file is moved.
Remarks
Section titled “Remarks”- The source file must exist. If it doesn’t, the function returns False.
- If the target file exists and bOverWrite is False, the file isn’t moved and the function returns False.
- After the move, the function checks that the target file exists and the source file is gone. If not, it returns False.
Example
Section titled “Example”If bStatus Then bStatus = File_MoveFile("C:\CapaInstaller.txt", "C:\Temp\CapaInstaller", True)Related functions
Section titled “Related functions”File_CopyFile File_CopyTree File_VerCopy Constants Package Property Variables