GET_FILESYSTEM with PATH_FILE_COUNT returns 0 if there are more files than MAX_FILE_COUNT
search cancel

GET_FILESYSTEM with PATH_FILE_COUNT returns 0 if there are more files than MAX_FILE_COUNT

book

Article ID: 422524

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

In v21 GET_FILESYSTEM with PATH_FILE_COUNT returns the number of files even if this number is higher than MAX_FILE_COUNT

In v24 the same returns zero:

U00020408 0000000000000000

Cause

DE180215

Resolution

Workaround:

An error is returned using the following script if the number of files exceeds MAX_FILE_COUNT:

:SET &NumberFiles# = GET_FILESYSTEM(<AGENT>, "<FOLDER>", PATH_FILE_COUNT)
:SET &ERRNR# = SYS_LAST_ERR_NR()
:IF &ERRNR# NE "0"
:   SET &ERRINS#  = SYS_LAST_ERR_INS()
:   SET &MESSAGE# = GET_MSG_TXT (&ERRNR#,&ERRINS#)
:   P &MESSAGE#
:   ELSE
:   P "Number of files ",&NumberFiles#
:ENDIF

Error:

2025-12-15 10:39:36 - U00020408 U02000121 File limit ('5') for file event ('4851007') has been exceeded.

Solution: 

This issue will be fixed in a future version of the product