wiki:Documentation/ARexxAPI/NEWMAILFILE

Version 3 (modified by AmigaPhil, 14 months ago) (diff)

--

Languages:


ARexx API

    NEWMAILFILE

    NAME

    NewMailFile -- Return a valid, but unused message filename for a folder. (V2.0)

    TEMPLATE

    VAR/K,STEM/K,FOLDER

    FUNCTION

    Returns a valid but still unused message filename for a folder, based on the current date. This is the filename that YAM will use when adding the next message to this folder.

    INPUTS

    VAR/K - alternative variable to put the results into instead of RESULT
    STEM/K - base name used for the stem where the filename will be returned
    FOLDER - optional, name or number of the folder; if none if supplied, the current folder will be used

    RETURNS

    VAR - filename returned, with path
    <STEM>FILENAME - filename returned, with path

    RC is set to 10 if the specified folder doesn't exist or a group is currently selected.

    NOTES

    The command works by trying to lock the first message slot usable for the current date (e.g. Work:YAM/folder_name/09097.001 for Nov 28, 2002) and then working from there until the lock fails.

    EXAMPLE

    BUGS

    SEE ALSO