Commands & Syntax > Commands > Networking/Web/E-mail >

www.perfectkeyboard.com

 

ftp RENAME FILE - < ftp_renamefile >() ... [Pro]

 

ftp RENAME FILE
<ftp_renamefile>("Old name","New name","Login name","Password","Silent")
Available in: Professional edition

Renames file on a remote FTP server.

 

#

Parameter name

Parameter description

1

Old name

Full path to the original remote file (e.g., ftp://softwareutilities.com/original.txt).

2

New name

Full path to the remote new file (e.g., ftp://softwareutilities.com/renamed.txt).

3

Login name

User login name. If empty the "anonymous" is considered.

4

Password

User name login password.

5

Silent

Silent mode. If set to 1 then the operation progress window is not displayed.

 

Example (Macro Steps):

 

1

<#> <#> This macro uploads file to an FTP server

2

Macro execution: ONLY COMMANDS

3

Form FIELD "Remote file - old name:" of type "Text edit" (Default value=, Variable to save field value=vRemoteFileOld, Form identifier=fm1)

4

Form FIELD "Remote file - new name:" of type "Text edit" (Default value=, Variable to save field value=vRemoteFileNew, Form identifier=fm1)

5

Form FIELD "User:" of type "Text edit" (Default value=, Variable to save field value=vUser, Form identifier=fm1)

6

Form FIELD "Password:" of type "Text edit" (Default value=, Variable to save field value=vPassword, Form identifier=fm1)

7

Form OPEN "fm1", Window title="File Rename"

8

IF STRING _vCanceled==1

9

Macro EXIT

10

ENDIF

11

ftp RENAME FILE "vRemoteFileOld" to "vRemoteFileNew" (Login name=vUser)

Example (Plain Text):

 

<#> This macro uploads file to an FTP server

<#>

<cmds>

 

<form_item>("fm1","Remote file - old name:","EDIT","","vRemoteFileOld")

<form_item>("fm1","Remote file - new name:","EDIT","","vRemoteFileNew")

<form_item>("fm1","User:","EDIT","","vUser")

<form_item>("fm1","Password:","EDIT","","vPassword")

 

<form_show>("fm1","File Rename","shell32.dll",1)

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

 

<ftp_renamefile>("vRemoteFileOld","vRemoteFileNew","vUser","vPassword")