Show Buttons
Share On Facebook
Share On Twitter
Share On Google Plus
Share On Linkdin
Share On Reddit
Contact us
Hide Buttons

FileSystemObject : MoveFile Method

Description: 

This func­tion moves a file from one loca­tion to another.

Format : 

objectOf­FileSys­te­mOb­ject. Move­File (source, destination);

Arguments: 
  • objectOf­FileSys­te­mOb­ject : As the name says, it’s a FileSystemObject.

As the name says, it’s a FileSystemObject.

  • source
    • Manda­tory
    • Type:     String
    • Path of a file to be moved.

  • des­ti­na­tion
    • Manda­tory
    • Type:     String
    • Path where file to be moved.

 

Function FnMoveFile(strSourceFilePath,strDestinationPath)

      Set fso = CreateObject("Scripting.FileSystemObject")

      fso. MoveFile(strSourceFilePath, strDestinationPath)

End Function

Call FnMove­Folder (“c:\New Folder\text.txt”,”d:\New Folder”)

 

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: