Skip to main content

Move-File

Command Description

Move the file to a specified path

Command Prototype

File.MoveFile(sPathSrc,sPathDst,bOverWrite)

Parameter Description

ParameterRequiredTypeDefaultDescription
sPathSrcTruepath'''C:\Users'''The original path to the files to move
sPathDstTruepath'''C:\Users'''The destination path to move files to
bOverWriteTruebooleanNoneWhether to overwrite if the target file already exists; when true is passed, overwrite the target file, when false is passed, the function fails

Demo

/************************************Move files************ ************************ 
Command prototype:
File.MoveFile('''C:\Users''','''C:\Users''',false)
Input parameters:
sPathSrc--the original path of the file to be moved
sPathDst--the destination path to move the file to
bOverWrite--overwrite if the target file already exists, the default is no
Outgoing parameters:
None
********************************************************************************/
Dim sPathSrc='''C:\Users\Chance\Desktop\testFile\data.txt'''
Dim sPathDst='''C:\Users\Chance\Desktop'''
File.MoveFile(sPathSrc,sPathDst,false)