Output custom files with custom filename extensions

We are outputing data files with a .csv extention, no problem, But there needs to be a file generated within Pega and output that has identically the same filename, but with a different extension, such as .trg that simply contains metadata about the data file: such as a record count. How can we do that within Pega?

@ChuckM17017921 In Pega, you can generate a .csv file using the BIX Extract rule or other file writing methods. However, generating a separate .trg file with metadata about the .csv file is not a built-in feature. You might need to create a custom solution for this. One approach could be to use a custom activity that reads the .csv file after it’s generated, calculates the metadata (like record count), and then writes this information to a .trg file. You can use the PublicAPI methods to write to a file in Pega. Please note that this would require advanced knowledge of Pega and might involve Java steps in the activity

:warning: This is a GenAI-powered tool. All generated answers require validation against the provided references.

BIX Extract output filename which is in (.csv) file format

How to create BIX CSV format file name dynamically

How to write into file (.txt, .excel, .csv) in Pega Robotics studio 8

XML/CSV ‘File Name’ to DataBase