Skip to main content

Delete-Folder

Command Description

Specify a folder path and delete the folder corresponding to the path

Command Prototype

File.DeleteFolder(sPath)

Parameter Description

ParameterRequiredTypeDefaultDescription
sPathTruepath'''C:\Users'''The path of the file folder that needs to be deleted, 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 needs to be escaped, such as "C:\Laiye RPA" or @res"Laiye RPA\ \Laiye RPA"

Demo

/************************************Delete folder*********** ************************ 
Command prototype:
File.DeleteFolder('''C:\Users''')
Input parameters:
sPath--the path of the folder to be deleted
Outgoing parameters:
None
********************************************************************************/
Dim sPath='''C:\Users\Chance\Desktop\testFile\tempFolder'''
File.DeleteFolder(sPath)