Filesystem-Commands

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Filesystem-Commands >

Filesystem-Commands

GFD. - Get File Date

Previous Top Next


MiniRobotLanguage (MRL)

 

GFD. Command

Get File Date

 

 

Intention

 

Returns a date information from a file. Depending on parameters this can be the:

1.  creation date

2.  last write

3.  last access

date of the specified file.

 

If you just use

 

GFD.?desktop\SLI-Bridge.txt

 

This is what you get on the TOS:

 

graphic

 

It's the "Last Write" Date, delimited by *. The reason, why it is delimited by * is, that this way you can more easy analyze the date using commands like SBD. and SBM. GES. Or FEM.

 

For most uses, these are the following three operation modes of GFD.

 

1.   GFD.$$FIL|$$RET|c

This will put the creation date of file $$FIL into $$RET.

 

2.   GFD.$$FIL|$$RET|a

This will put the last access date of file $$FIL into $$RET.

 

3.   GFD.$$FIL|$$RET|w

This will put the last write date of file $$FIL into $$RET.

 

To get more information on what to do with the results from this command, see also: 1.5.2 Working with Text-Strings .

 

 

 

Syntax

 

 

GFD.[P1][|P2[|P3]

 

 

Parameter Explanation

 

P1 - Filename

P2 - Variable or "-" to return the file-date (alternatively TOS is used)

P3 - optional c/a/w depending what file-date shall be returned

 

 

 

Example

 

''**********************************************

' GFD. - Sample

' Please use a path from files which are available

' on your system.

'**********************************************

'DBM.2

' Path to an existing file

VAR.§§FIL=?path\TestApp.exe

PRT.===========================================

GFD.§§FIL

PRT.Creation Date: $$000

GFD.§§FIL|-|a

PRT.Last access Date: $$000

GFD.§§FIL|§§RES|w

PRT.Last write Date: §§RES

PRT.===========================================

DMP.4

END.

 

 

 

 

Remarks

 

-

 

 

Limitations:

 

-

 

 

See also:

 

    GFD. - Get File Date

    GFV. - Get File Version

    IFD. / NFD. - If File Date

    IFV. / NFV. If File Version

    GSS. - GetSplitString

    GES. - Get-Extracted-String

    SBD. - String between Delimiter

    SBM. - String between Delimiter-Multiple

    FEM. - For Each Member