Commands & Syntax > Commands > Folder Manipulation >

www.perfectkeyboard.com

 

MOVE - < dirmove >() ... [Pro]

 

Folder MOVE
<dirmove>("Source","Destination",Subfolders,Unused,Retries,Variable for number of processed files,Variable for number of failures,"Log errors","Additional options")
Available in: Professional edition

Moves directory including all subdirectories.

 

#

Parameter name

Parameter description

1

Source

Full path to the source directory (e.g., "c:\mydocuments").

2

Destination

Full path to the destination directory (e.g., "c:\newdocs").

3

Subfolders

Must be 0.

4

Unused

Must be 0.

5

Retries

 

6

Variable for number of processed files

 

7

Variable for number of failures

 

8

Log errors

 

9

Additional options

 

 

Example (Macro Steps):

 

1

<#> <#> This macro moves directory you select to other directory you select.

2

Macro execution: ONLY COMMANDS

3

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

4

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

5

Procedure CALL: ExitOnCancel with parameters ()

6

Message CLOSE

7

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

8

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

9

Procedure CALL: ExitOnCancel with parameters ()

10

Message CLOSE

11

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

12

Folder MOVE from "vDirSource" to "vDirDest" (Subfolders = No, Retries = , Variable for number of processed files = , Variable for number of failures = , Log errors = , Additional options = )

13

Message CLOSE

14

<#> <#> --------------------------------------------------------------------

15

Procedure BEGIN: ExitOnCancel with parameters ()

16

IF STRING _vCanceled==1

17

Macro EXIT

18

ENDIF

19

Procedure END

20

<#> <#> --------------------------------------------------------------------

Example (Plain Text):

 

<#> This macro moves directory you select to other directory you select.

<#>

<cmds>

 

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

<var_oper>(vDirSource,"",SELECT_FOLDER,"Select Source Folder","", "0")

<proc_call>(ExitOnCancel,)

<msgoff>

 

<msg>(100,100,"Select destination folder.","Message",0)

<var_oper>(vDirDest,"",SELECT_FOLDER,"Select Destination Folder","", "0")

<proc_call>(ExitOnCancel,)

<msgoff>

 

<msg>(100,100,"Directory move is in progress. Please wait....","Message",0)

<dirmove>("vDirSource","vDirDest",0,0)

<msgoff>

 

<#> --------------------------------------------------------------------

 

<proc_def_begin>(ExitOnCancel,)

<if_str>("_vCanceled==1")

   <exitmacro>

<endif>

<proc_def_end>

 

<#> --------------------------------------------------------------------