Commands & Syntax > Commands > Folder Manipulation >

DELETE - < dirdel >() ... [Free]

www.perfectkeyboard.com

 

Folder DELETE
<dirdel>("Source",Unused,Retries,Variable for number of processed files,Variable for number of failures,"Log errors",Show progress)
Available in: Free edition

Deletes directory including all subdirectories. The directory doesn't have to be empty - all the files in the directory are deleted.

 

#

Parameter name

Parameter description

1

Source

Full path to the directory to delete (e.g., "c:\olddata").

2

Unused

Must be 0.

3

Retries

 

4

Variable for number of processed files

 

5

Variable for number of failures

 

6

Log errors

 

7

Show progress

 

 

Example (Macro Steps):

 

1

<#> <#> This macro deletes directory you select

2

Macro execution: ONLY COMMANDS

3

Message SHOW "" : "Select folder you want to delete." (other parameters: x = 100, y = 100, Window title = Message, Buttons = None, Timeout (seconds) = , Always on top = ).

4

Variable OPERATION "SELECT_FOLDER" (Variable for result = vDir, Input text/variable = , Parameter 1 = Select Folder, Parameter 2 = , Parameter 3 = 0)

5

IF STRING _vCanceled==1

6

Macro EXIT

7

ENDIF

8

Message CLOSE

9

Message SHOW "" : "Folder delete process is in progress. Please wait...." (other parameters: x = 100, y = 100, Window title = Message, Buttons = None, Timeout (seconds) = , Always on top = ).

10

Folder DELETE "vDir" (Unused = 0, Variable for number of processed files = , Variable for number of failures = , Log errors = , Show progress = )

11

Message CLOSE

Example (Plain Text):

 

<#> This macro deletes directory you select

<#>

<cmds>

 

<msg>(100,100,"Select folder you want to delete.","Message",0)

<var_oper>(vDir,"",SELECT_FOLDER,"Select Folder","", "0")

<if_str>("_vCanceled==1")

   <exitmacro>

<endif>

<msgoff>

 

<msg>(100,100,"Folder delete process is in progress. Please wait....","Message",0)

<dirdel>("vDir",0)

<msgoff>