How to get the file name generated through a data set

We are calling “DataSet-Execute” method in an activity and generating a text file using a data set rule. In data set rule we have given File Path as “POC_%{yyyyMMdd}.txt”

We have observed that the file is being generated as

“POC_20241227-webi011c48d3c9806238f1961735300394578.txt”

web node and few more numbers are getting appended to the filename automatically.

We need generated file name for further processing. Is there a way to get the data set generated file name.

Thanks in advance!

@AlekhyaP16661996 To retrieve the dynamically generated file name in Pega when using the DataSet-Execute method, inspect the clipboard after execution, particularly under pxResults or related pages, to see if the file name is stored. If unavailable, enable debug logging for the DATASET logger to capture the file name during execution. Alternatively, write a Java step to search the output directory for the latest file matching your pattern (e.g., POC_*.txt). Ensure the directory and file path are configured for easier retrieval, or consider using an absolute path without dynamic placeholders.