Added August 2023
xcall MIAMEX, MX_DIRCLEAN, dirspec, loc'rem, status {,wildspec, flags, timelimit, bytes}
MIAMEX function MX_DIRCLEAN (204) scans a specified directory, counting and/or deleting files based on various filter attributes.
This function has both a subroutine and a print tab implementation.
Parameters
dirspec (String) [in]
target directory, in any reasonable format; may include %env% variables
loc'rem (String) [in]
L)ocal interprets dirspec as local to application server; R)emote or C)lient interprets direspec as an ATE remote spec
status (Num) [out]
returns the number of files matched or deleted; negative values indicate errors
wildspec (String) [in]
optional wildcard spec (default is *.*)
flags (Num) [in]
sum of:
Value |
Meaning / Effect |
&h0001 |
only files with mtime < timelimit |
&h0002 |
only files with timestamp < timelimit |
&h0004 |
only files > bytelimit |
&h0008 |
only files < bytelimit |
&h0010 |
no action (just count matching files, bytes; else delete) |
timelimit (filetime) [in]
time threshold (seconds since the 'epoch') if flags &h0001 or &h0002 specified
bytes (Num) [in/out]
on input, sets file size threshhold (if flags &h0004 or &h0008); on output returns number of matching files
See Also
History
2023 August, A-Shell 6.5.1740: Function added to A-Shell