I have added a UDF to my web site to access File Info.  It contains all 
Elements of the WIN32_FIND_DATA structure
EXCEPT the two reserved elements, which do not return any values at this time 
anyway.

I decided on a UDF instead of a Plugin so that certain elements of the return 
value could be further manipulated by RBase Functions In-Line in lieu of 
succession (unfortunately setting the var to a dateTime when calling the UDF 
doesn't work directly and must be converted on the next succession as shown in 
the notes below).

FileInfo UDF is as follows:

Useage:

  either
set var vFileInfo = (udf('@FileInfo.dll','C:\Temp\FileName'))
  or
set var vFileInfo = (udf('@FileInfo.dll','FileName'))

Result for both will be the same if the UDF is called in C:\Temp Directory.


The vFileInfo variable will contain a CSV string of Seven (7) elements 
containing:


(1) File Attribute Value
      A = FILE_ATTRIBUTE_ARCHIVE
      C = FILE_ATTRIBUTE_COMPRESSED
      H = FILE_ATTRIBUTE_HIDDEN
      N = FILE_ATTRIBUTE_NORMAL
      O = FILE_ATTRIBUTE_OFFLINE
      R = FILE_ATTRIBUTE_READONLY
      S = FILE_ATTRIBUTE_SYSTEM
      T = FILE_ATTRIBUTE_TEMPORARY
(2) Create Date and Time
(3) Last Accessed Date and Time
(4) Modified Date and Time
(5) Size
(6) Full FileName
(7) If > 8.3 FileName then the Alternate "Short" FileName


So:
  Set var vAttrib = (SSUB(UDF('@FileInfo.dll','SomeFileName')),1))
    The Variable vAttrib will contain a text value of the FileAttribute 
Setting.

  Set var vTemp = (SSUB(UDF('@FileInfo.dll','SomeFileName')),2))
  Set var vCreated DateTime = .vTemp
    The Variable vCreated will contain a valid DateTime value
    Each of the DateTime elements must be converted this way

  Set var vFileSize Double = 
(Float((SSUB(UDF('@FileInfo.dll','SomeFileName')),5))))
    The Variable vFileSize will contain the FileSize even for > 2GB Files.

--- RBASE-L
================================================
TO POST A MESSAGE TO ALL MEMBERS:
Send a plain text email to [email protected]

(Don't use any of these words as your Subject:
INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH,
REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP)
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: INTRO
================================================
TO UNSUBSCRIBE: 
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: UNSUBSCRIBE
================================================
TO SEARCH ARCHIVES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: SEARCH-n
(where n is the number of days). In the message body, 
place any 
text to search for.
================================================

Reply via email to