Method: Move for Folder
- Updated2024-09-12
- 1 minute(s) read
FileSystemObject and Dictionary > Methods > Method: Move for Folder
Method: Move for Folder
Moves a folder into another folder.
Object.Move(Destination)
| Object | Folder Object with this method |
| 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 Move 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 the complete C:\Examples\Documents folder to the C:\Temp\Documents folder:
Sub MoveEntireFolder(sSource,sTarget) Dim fso, oMyFolder Set fso = CreateObject("Scripting.FileSystemObject") set oMyFolder = fso.GetFolder(sSource) Call oMyFolder.Move(sTarget) End Sub Call MoveEntireFolder("C:\Examples\Documents", "c:\Temp\Documents")
