Commands & Syntax > Commands > File Mainpulation >

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

www.perfectkeyboard.com

 

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

This command moves file(s).

 

#

Parameter name

Parameter description

1

Source

Full path to the file to move (e.g., "c:\mydocuments\original.doc"). The file path can contain wildcard characters (*?). In such the case all the files matching the pattern are moved. Can be a static text or variable containing text.

2

Destination

Full path to the new file (e.g., "c:\mydocuments\copy.doc"). If the FileSource contains wildcard characters the FileDestination must specify directory (e.g., "c:\mydocuments") where multiple files are moved.

3

Subfolders

Takes effect only if the FileSource contains wildcard characters. If 1, files from all the sub directories are moved as well (if matching the pattern). If 0, files from sub directories are not moved.

4

Unused

Must be 0.

5

Retries

If the move fails the command can retry to move again. This parameter tells the number of retries.

6

Variable for number of processed files

This variable receives the number of files copied. This parameter can be left blank.

7

Variable for number of failures

This variable receives the number of failures. This parameter can be left blank.

8

Log errors

If a file cannot be moved then it is recorded in report file. This parameter can be left blank.

9

Additional options

Additional parameters:
"-pr" - show progress window
"-on" - overwrite file only if it is newer.

 

Example (Macro Steps):

 

1

<#> <#> This macro moves file you select to "c:\temp\" folder

2

Macro execution: ONLY COMMANDS

3

Variable OPERATION "SELECT_FILE" (Variable for result = vFile, Input text/variable = *.txt, Parameter 1 = Select File, Parameter 2 = , Parameter 3 = 0)

4

IF STRING _vCanceled==1

5

Macro EXIT

6

ENDIF

7

File MOVE from "vFile" to "c:\temp\" (Subfolders = No, Retries = 0, Variable for number of processed files = , Variable for number of failures = , Log errors = , Additional options = )

Example (Plain Text):

 

<#> This macro moves file you select to "c:\temp\"  folder

<#>

<cmds>

<var_oper>(vFile,"*.txt",SELECT_FILE,"Select File","", "0")

<if_str>("_vCanceled==1") <exitmacro> <endif>

<filemove>("vFile","c:\temp\",0,0,0,,,"","")