$ps.file.moveDirectory
Overview¶
Specify "$ps.file" in "Server Script" to rename or move the directory.
Prerequisites¶
DisableServerScriptFile in "Script.json" must be set to false.
Syntax¶
Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| section | string | Yes | Section name. For details about sections, see "About Sections" in "$ps.file". |
| old_name | string | Yes | Old directory name. For both Windows and Linux, the directory separator is "/". |
| new_name | string | Yes | New directory name. For both Windows and Linux, the directory separator is "/". |
Return Value¶
Returns true if the directory can be moved, and false if it cannot be moved.
Exceptions¶
If an exception occurs in C#, the server script will throw an exception by putting the exception class name and error message into the Error object.
Usage Examples¶
The following example changes the specified directory name in the web server.
JavaScript¶
The following example moves the specified directory in the web server.
JavaScript¶
Supported Versions¶
| Supported versions | Body |
|---|---|
| 1.4.12.0 and later | Added function |