Skip to main content

Move-Folder

Command Description

Move the folder to a specified path

Command Prototype

File.MoveFolder(sPathSrc,sPathDst,bOverWrite)

Parameter Description

ParameterRequiredTypeDefaultDescription
sPathSrcTruepath'''C:\Users'''The path of the folder that needs to be moved. You can fill in the absolute path or use the @res "path" form to indicate the path under the res folder of the current process. The path separator must be escaped, such as "C:\Laiye RPA" or @res"Laiye RPA \Laiye RPA"
sPathDstTruepath'''C:\Users'''The path of the folder to be moved to. You can fill in the absolute path or use the @res "path" form to indicate the path under the res folder of the current process. The path separator must be escaped, such as "C:\Laiye RPA" or @res" Laiye RPA\Laiye RPA"
bOverWriteTruebooleanNoneYou can choose whether to replace a file or folder with the same name when you move it

Demo

/************************************Move Folder*********** ************************ 
Command prototype:
File.MoveFolder('''C:\Users''','''C:\Users''',false)
Input parameters:
sPathSrc--the path of the folder that needs to be moved
sPathDst--the folder path to move to
bOverWrite--overwrite if the target file already exists, the default is no
Outgoing parameters:
None
********************************************************************************/
Dim sPathSrc='''C:\Users\Chance\Desktop\testFile\tempFolder'''
Dim sPathDst='''C:\Users\Chance\Desktop'''
File.MoveFolder(sPathSrc,sPathDst,false)