OverviewExamples
File.Move ( |
Moves a file to another location.
(string) The path to the file that you want to move. You can use the * and ? wildcards in this field to move multiple files.
(string) The path to the destination folder or file that you want to move to.
Warning: Any folders in the destination path must already exist when performing this action, or an error will result.
Tip: You can use a Folder.Create action to create a destination folder if necessary.
(boolean) Whether to recurse through subfolders when a wildcard is used in the Source parameter:
VALUE |
DESCRIPTION |
true |
Recurse. (Default) |
false |
Don't recurse. |
(boolean) Whether to overwrite any files in the destination folder if they have the same names as the files being moved:
VALUE |
DESCRIPTION |
true |
Move the source files right over the destination files. (Default) |
false |
Don't move a file if another file with the same name already exists in the destination folder. |
(boolean) Whether to abort the move operation if an error occurs:
VALUE |
DESCRIPTION |
true |
Stop moving as soon as the first error occurs. |
false |
Continue moving files even if some files fail to move. (Default) |
(boolean) Whether to move files that have the "hidden" or "system" attributes set:
VALUE |
DESCRIPTION |
true |
Move files even if they have the "hidden" or "system" attributes set. |
false |
Don't move any files that have the "hidden" or "system" attributes set. (Default) |
(function) The name of a function that will be called whenever progress is made in the move operation. (You can use this callback function to display the progress of the move operation in your own custom way.)
Note: If CallbackFunction is set to nil, then the progress information will be sent to the built-in status dialog, assuming it is currently visible. (You can show or hide the status dialog with a StatusDlg.Show or StatusDlg.Hide action.)
The callback function must be able to receive the following parameters:
(string) The source path of the file being copied.
(string) The destination path for file being copied.
(number) The number of bytes copied so far.
(number) The total bytes that will be copied.
(number) The number of bytes of the current file moved so far.
(number) The current file's total bytes that will be moved.
The callback function should return a boolean value (true or false) indicating whether the move application should continue:
VALUE |
DESCRIPTION |
true |
Continue with the move operation. |
false |
Stop the move operation as soon as possible. |
Nothing. You can use Application.GetLastError to determine whether this action failed, and why.
See also: Related Actions