Be the first user to complete this post

  • 0
Add to List

FileSystemObject : MoveFolder Method

Description: 

This function moves a Folder from one location to another.

Format : 

objectOfFileSystemObject. MoveFolder (source, destination );

Arguments: 
  • objectOfFileSystemObject

As the names says, it’s a FileSystemObject.

  • source
    • Mandatory
    • Type:     String
    • Path of a folder to be moved.
  • destination
    • Mandatory
    • Type:     String
    • Path where folder to be moved.
Function FnMoveFolder(strSourcePath,strDestinationPath)

      Set fso = CreateObject("Scripting.FileSystemObject")

      Set objFolder = fso. MoveFolder(strSourcePath, strDestinationPath)

End Function

Call FnMoveFolder ("c:\New Folder",”d:\New Folder”)



Also Read:

  1. FileSystemObject in Excel Macro
  2. FileSystemObject : FolderExists Method
  3. FileSystemObject : GetExtensionName Method
  4. FileSystemObject : DriveExists Method
  5. FileSystemObject : GetFolder Method
  6. FileSystemObject:OpenTextFile Method
  7. FileSystemObject : GetAbsolutePathName Method
  8. FileSystemObject : CopyFolder Method