DirMove
From AutoIt Wiki
Moves a directory and all sub-directories and their content. May be used as a renaming mechanism. Adapted from AutoIt docs.
Contents |
Syntax
DirMove("source","destination" [,flag])
Parameters
| source | Path of the source directory. e.g. "C:\Path1" |
| destination | Path to be moved to. e.g. "C:\Path2" |
| flag | determines overwrite characteristic.(Optional) |
Note: Paths do not require trailing backslashes.
Flag
0 no overwrite 1 overwrite existing
Return Value
Success: Returns 1.
Failure: Returns 0 if an error occurs.
Remarks
If the source and destination are on different volumes or UNC paths are used, then a copy/delete operation will be performed. If the destination already exists and the overwrite flag is specified then the source directory will be moved into the destination.
Example
DirMove(@MyDocumentsDir, "C:\Backups\MyDocs")