|
|
|
|
- Moving or renaming a file
- Handling errors
- Operating mode in Windows Vista (and later)
fMoveFile (Function) In french: fDéplaceFichier Moves a file from one directory to another. The file can be renamed during the move.
// Move a file Res is boolean = fMoveFile("D:\Example\Win1.wdw", "C:\Temp\Window\Win1.wdw")
Syntax
<Result> = fMoveFile(<Path of source file> , <New file path>)
<Result>: Boolean - True if the move was performed,
- False otherwise. To get more details on the error, use ErrorInfo with the errMessage constant.
<Path of source file>: Character string Name and full (or relative) path of the file to move (up to 260 characters). A UNC path can be used. Wildcard characters are not allowed. <New file path>: Character string New name and full (or relative) path of the file (up to 260 characters). A UNC path can be used. Wildcard characters are not allowed.
Remarks Moving or renaming a file If <Path of source file> and <New file path> contain the same file name but different access paths, fMoveFile moves the file. If <Path of source file> and <New file path> contain different file names and different paths, fMoveFile moves and renames the file. Remarks: - In Windows, fMoveFile is equivalent to fRename.
 In Android, a file stored on the external memory (SDCard) cannot be moved to the internal memory of the device (and conversely).
Handling errors fMoveFile throws an error in the following cases: - the file to move does not exist,
- the file to move is locked,
- the path of the file to move is invalid,
- <New file path> or <Path of source file> is an empty string,
- the new file already exists.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|