ftp GET FILE MODIFICATION TIME - < ftp_filetime >() ... [Pro]
ftp GET FILE MODIFICATION TIME <ftp_filetime>("Variable for result","Remote file","Login name","Password","Silent") Available in: Professional edition
|
This command retrieves last modification time of a file on a remote FTP server. The time is in form: "MM/DD/YYYY Hour:Minute:Second".
|
#
|
Parameter name
|
Parameter description
|
1
|
Variable for result
|
Variable that receives last file modification time in "MM/DD/YYYY Hour:Minute:Second" form.
|
2
|
Remote file
|
Full path to the remote file (e.g., ftp://pitrinec.com/pub/test.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 sample retrieves last modification time of file placed on remote FTP server
|
2
|
<#> <#>
|
3
|
Macro execution: ONLY COMMANDS
|
4
|
ftp GET FILE MODIFICATION TIME Variable for result=vFileTime, Remote file=ftp://pitrinec.com/pub/test.txt, Login name=
|
5
|
Message SHOW "" : "Last modification time of "ftp://pitrinec.com/pub/test.txt" file is %vFileTime%." (other parameters: x = -100, y = -100, Window title = Message, Buttons = OK, Timeout (seconds) = , Always on top = ).
|
6
|
Message SHOW "" : "Do you want to parse the time?" (other parameters: x = -100, y = -100, Window title = Message, Buttons = Yes and No, Timeout (seconds) = , Always on top = ).
|
7
|
IF STRING _vMsgButton==YES
|
8
|
Variable PARSE "vFileTime" to variable array "vTimeItems" (Delimiter = / :, Trim character = , Variable array for enumerated items = vTimeItems, Variable array size = vNumberOfTimeItems)
|
9
|
Loop BEGIN Repeat = vNumberOfTimeItems
|
10
|
Message SHOW "" : "%vTimeItems[_vLoopCounter0]%" (other parameters: x = -100, y = -100, Window title = Time items:, Buttons = OK, Timeout (seconds) = , Always on top = ).
|
11
|
Loop END
|
12
|
ENDIF
|
|
Example (Plain Text):
<#> This sample retrieves last modification time of file placed on remote FTP server
<#>
<cmds>
<ftp_filetime>("vFileTime","ftp://pitrinec.com/pub/test.txt","","")
<msg>(-100,-100,"Last modification time of %_vQuoteChar%ftp://pitrinec.com/pub/test.txt%_vQuoteChar% file is %vFileTime%.","Message",1)
<msg>(-100,-100,"Do you want to parse the time?","Message",2)
<if_str>("_vMsgButton==YES")
<var_parse>("vFileTime","/ :","",vTimeItems,vNumberOfTimeItems)
<begloop>(vNumberOfTimeItems)
<msg>(-100,-100,"%vTimeItems[_vLoopCounter0]%","Time items:",1)
<endloop>
<endif>