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 |
[edit] Syntax
DirMove("source","destination" [,flag])
[edit] 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.
[edit] Flag
0 no overwrite 1 overwrite existing
[edit] Return Value
Success: Returns 1.
Failure: Returns 0 if an error occurs.
[edit] 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.
[edit] Example
DirMove(@MyDocumentsDir, "C:\Backups\MyDocs")
