Command Reference

Rename File

Renames a file or directory on the local system.

Action ID: 9
Action Category: File Operations

Settings

Locations

Source

The full path to the directory or filename that you want to rename.

Destination

The new full path for the directory or file.

Return Values

Value
(%LastErrorNum%)

Simple Message
(%LastErrorMsg%)

Verbose Message
(%LastErrorDetails%)

0 (OK)

 

 

1

Could not rename file.

Invalid destination specified.
<<Destination>>

2

Could not rename file.

File not found.
<<Source>>

3

Could not rename file.

Name contains invalid characters.
<<Source>>
<<Destination>>

4

Could not rename file.

Destination already exists.
<<Destination>>

Example

In this example we will rename our old uninstall INI file from: "IRUNIN.INI" to "IRUNIN.BAK".

Source: %AppDir%\IRUNIN.INI
Destination: %AppDir%\IRUNIN.BAK

 

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