$file » History » Version 10
Per Amundsen, 02/16/2023 09:40 PM
1 | 1 | Per Amundsen | _Added in 1.8.10_ |
---|---|---|---|
2 | |||
3 | 7 | Per Amundsen | *$file(filename|foldername|name)* |
4 | 1 | Per Amundsen | |
5 | Returns information about the specified file or folder. |
||
6 | |||
7 | Default returns file size. |
||
8 | |||
9 | 3 | Per Amundsen | _Same as [[$lof]]._ |
10 | |||
11 | 1 | Per Amundsen | *Parameters* |
12 | |||
13 | 10 | Per Amundsen | table(ktable). |
14 | |*Parameter*|*Description*| |
||
15 | | filename<notextile>|</notextile>foldername<notextile>|</notextile>name | Filename or folder or open file in [[$fopen]] to retrieve information from. | |
||
16 | 1 | Per Amundsen | |
17 | *Properties* |
||
18 | |||
19 | 10 | Per Amundsen | table(ktable). |
20 | |*Property*|*Description*| |
||
21 | | .size | File size in bytes. (returns 0 for folders) | |
||
22 | | .ctime | Creation time. (unix timestamp) | |
||
23 | | .mtime | Last modification time. (unix timestamp) | |
||
24 | | .atime | Last access time. (unix timestamp) | |
||
25 | | .shortfn | Short file name. | |
||
26 | | .longfn | Full file name. | |
||
27 | | .attr | File attributes. | |
||
28 | | .sig | Returns "ok" if digital signed, else "none". | |
||
29 | | .version | Returns the file version, if any. | |
||
30 | | .path | The path directory. | |
||
31 | | .name | The filename without the file extension. | |
||
32 | | .ext | The file extension. | |
||
33 | | .pid | Returns the first process id started by this file. *(AdiIRC Only)* | |
||
34 | 6 | Per Amundsen | |
35 | 1 | Per Amundsen | *Example* |
36 | |||
37 | <pre> |
||
38 | 2 | Per Amundsen | ; Show AdiIRC.exe filesize |
39 | 1 | Per Amundsen | //echo -ag $file($adiircexe).size |
40 | |||
41 | 2 | Per Amundsen | ; Show explorer.exe digital signature |
42 | 1 | Per Amundsen | //echo -ag $file(c:\windows\explorer.exe).sig |
43 | </pre> |