Skip to content

File_MoveFile

Moves a file from source to a destination

File_MoveFile(sSourceFile, sTargetFile, bOverWrite) As Boolean

File to move

Name of target file

Overwrite existing file. If True, an existing target file is deleted, also if it’s read-only, before the file is moved.

  • 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.
If bStatus Then bStatus = File_MoveFile("C:\CapaInstaller.txt", "C:\Temp\CapaInstaller", True)

Scripting Guidelines

File_CopyFile File_CopyTree File_VerCopy Constants Package Property Variables