Command Reference

Move Files

Moves files on the local system.

Action ID: 35
Action Category: File Operations

Settings

Locations

Source

The path and filename of the file(s) you want to move (this can include the wildcards "*" and "?").

Destination

The destination directory and/or filename. Do NOT use wildcards in this field.

Note: The destination directory MUST already exist when performing this action. If Destination includes a path, all of the folders in the path must already exist. You can use a Create Directory action to create a destination directory if necessary.

Options

Recurse subdirectories

If checked, the move command will recurse through subdirectories when a wildcard is used in the Source field.

Overwrite existing files

If checked, any existing destination files will be overwritten by the source files. If unchecked, destination files will not be overwritten by source files.

Continue moving files even if one or more fail

If checked, the move operation will continue even if some files fail to be moved. If unchecked, the move operation will stop as soon as the first error occurs.

Move hidden and system files

If checked, files with the "hidden" or "system" attributes set will be moved. If unchecked, hidden and system files will not be moved.

Return Values

Value
(%LastErrorNum%)

Simple Message
(%LastErrorMsg%)

Verbose Message
(%LastErrorDetails%)

0 (OK)

 

 

1

Could not move file(s).

Invalid source specified.
<<Source>>

2

Could not move file(s).

Invalid destination specified.
<<Destination>>

3

Could not move file(s).

File not found.
<<Source>>

4

Could not move file(s).

The specified path was not found.
<<Destination>>

5

Could not move file(s).

One or more files could not be moved.
<<Comma separated list of files that could not be moved>>

Example

In this example, we will move a file named "database.bak" from the same directory that the setup executable is being run from to a sub-directory called "backup".

Note: %SrcDir% is a built-in variable.

Source: %SrcDir%\database.bak
Destination: %SrcDir%\backup

 

See Also: Alphabetical List of Actions, Categorical List of Actions, On Error tab