FindFiles.dll
As of LION6.NET Patch 2 Findfiles.dll is obsolete and is not distributed in AMT. All the necessary functionality is in the normal File Control Functionality functions that are handled by the File controller of AMT. |
For older AMT applications with findfiles calls already present, it is possible to call either
'FINDFILES' or 'FINDFILES.dll' as a backwards compatibility feature. As this feature will not be developed further, it is strong advised to change these calls to the File Control Functionality directly when updating the older code. |
AMT used to deliver standard a DLL called "Findfiles.dll". This component
contains some functions that can be put to use in your own generated application(s). The functions are available in
your forms as well as in reports.
All parameters that are passed, are to be separated by comma's. Also the returned parameters are separated by
comma's (,).
When functions are used for getting date and/or time stamps, AMT will return
these values according to the standard GMT. This means that the corrections that are done through the local time
settings in Windows do not apply on the data that is stored in SI-PARAM.
The following functions are available:
- APPENDTOFILE
- DIRECTORYCREATE
- DIRECTORYDELETE
- FILECOPY
- FILEDELETE
- FILEMOVE
- FINDALLFILES
- FINDDIRECTORY (with option "ALL")
- FINDFILE
- GETFILEDATE
- GETFILESIZE
- GIVEFILECONTENT
- ISFILELOCKED
- REPLACESTRING
- SHRINKFILETONNRECORDS
- SPLITINTORECORDS
- WRITEFILE
APPENDTOFILE To enlarge an existing file from SI-PARAM in screen logic Input : <filename>,<recordsize>,<content> Result: <spaces> | <error message> Example: |
DIRECTORYCREATE To create a directory, eventually with subdirectories. Input: <dirname> Result: <spaces> | <error message> Example: |
DIRECTORYDELETE To delete a directory. Deletion will only be done when the directory is empty. Input : <dirname> Result: <spaces> | <error message> Example: |
FILECOPY To copy a file. Input : <filename 1>,<file name 2> Result: <spaces> | <error message> Example: |
FILEDELETE To delete a file. Input : <filename> Result: <spaces> | <error message> Example: |
FILEMOVE To rename a file. Input : <filename 1>,<file name 2> Result: <spaces> | <error message> Example: |
FINDALLFILES To find all files in a directory that correspond to the specified file mask. Input : <directory + filemask> , <outputfile> Result: <spaces> | <error message> Example: |
FINDDIRECTORY To find the first subdirectory or all subdirectories that correspond(s) to the specified mask. Input : <directory + mask> | [,ALL]; Result: <spaces> | <dirname>[,<dirname>] Example: |
FINDFILE To find a file that corresponds to the specified file mask. Input : <directory + filemask> Result: <spaces> | <filename>,<filesize> Example: |
GETFILEDATE To obtain time-stamps of a file Input : <filename> [, <file size>] Result: <spaces> | <ddmmccyy hhmmss>,<ddmmccyy hhmm>>,<ddmmccyy hhmm> Example: |
GETFILESIZE To check whether a file is still growing in size Input : <filename> [, <file size>] Result: <spaces> | <filename>,<file size> Example: |
GIVEFILECONTENT To read a file content into SI-PARAM in screen logic Input : <filename>,<recordsize> Result: <file content> | <error message> Example: |
ISFILELOCKED To check whether a file is locked by another program Input : <filename> Result: <spaces> | "LOCKED" Example: |
REPLACESTRING Replaces all occurrences of the <original string> in the <original file> by the <new string>, unless an optional <new file> is specified. If a <new file> is specified, the <original file> will not be changed. If the <new file> already exists, it will be overwritten with the new file content (without a warning). If the <new file> does not exist yet, this file will be created automatically and it will be filled instantly, using the new strings. Input : <original file>, <original string>, <newstring>[, <new file>] Result: <spaces> | <error message> Notes:
|
SHRINKFILETONNRECORDS Makes sure that in the extract file that is specified in the parameter <filename> any record that exists after the record that is referred to with parameter <last record no> will be removed. The parameter <record size> represents the length for each record. Input: <filename>, <record size>, <last record no> Result: <spaces> | <error message> |
SPLITINTORECORDS To splitup long strings of a file into separate strings. The recordsize must be known in the function. The original file can contain more than one record. Input : <original filename>,<recordsize>,<newfilename> Result: <spaces> | <error message> Example: |
WRITEFILE To create a file from SI-PARAM in screen logic Input : <filename>,<recordsize>,<content> Result: <spaces> | <error message> Example: |