Be the first user to complete this post
|
Add to List |
FileSystemObject : MoveFile Method
Description:
This function moves a file from one location to another.
Format :
objectOfFileSystemObject. MoveFile (source, destination);
Arguments:
- objectOfFileSystemObject : As the name says, it’s a FileSystemObject.
As the name says, it’s a FileSystemObject.
- source
- Mandatory
- Type: String
- Path of a file to be moved.
- destination
- Mandatory
- Type: String
- Path where file to be moved.
Function FnMoveFile(strSourceFilePath,strDestinationPath) Set fso = CreateObject("Scripting.FileSystemObject") fso. MoveFile(strSourceFilePath, strDestinationPath) End Function
Call FnMoveFolder ("c:\New Folder\text.txt",”d:\New Folder”)
Also Read:
- FileSystemObject : DriveExists Method
- FileSystemObject : FolderExists Method
- VBA-Excel: Add/Insert multiple objects from a folder in an Excel Document.
- FileSystemObject : CopyFolder Method