are there any rules when a temp file on the NAV Server (created eg. via ServerTempFileName Function in Filemanagement codeunit) will be deleted automatically?
ServerTempFileName returns a filename with full path only. The file created with CREATETEMPFILE within that function will be deleted during CLOSE, or shortly after, by the operating system. It serves only to get a (most likely) unique filename.
Any file you create, using that name ServerTempFileName returns, is just a regular file which happens to be located in the service user's TEMP path. I don't think that file will be deleted automatically anytime.
Comments
ServerTempFileName returns a filename with full path only. The file created with CREATETEMPFILE within that function will be deleted during CLOSE, or shortly after, by the operating system. It serves only to get a (most likely) unique filename.
Any file you create, using that name ServerTempFileName returns, is just a regular file which happens to be located in the service user's TEMP path. I don't think that file will be deleted automatically anytime.