Method: MoveFolder for FileSystemObject
- Updated2024-09-12
- 1 minute(s) read
FileSystemObject and Dictionary > Methods > Method: MoveFolder for FileSystemObject
Method: MoveFolder for FileSystemObject
Moves one or more folders.
Object.MoveFolder(Source, Destination)
| Object | FileSystemObject Object with this method |
| Source | String Specifies the path of the files that you want to move. The path may contain wildcards in the last path component. If the source contains wildcards, the target path must lead to an existing folder. |
| Destination | String Specifies the path of the target folder to which DIAdem moves the source folder. The path of the target folder must not contain wildcards. If the target is an existing file, an error occurs. |
![]() | Note The MoveFolder method aborts as soon as the first error occurs. DIAdem does not undo changes made to the file system before an error occurred. |
The following example moves a folder:
Sub MoveEntireFolder(sSource,sTarget) Dim fso Set fso = CreateObject("Scripting.FileSystemObject") Call fso.MoveFolder(sSource,sTarget) End Sub
