do we have any OOTB logic to move the files/folders that have already been processed, to an archive folder in pega sftp server

As we transition to Pega Cloud, we aim to transfer files uploaded to the Pega SFTP internet server to our company-managed FTP server within our intranet. To achieve this, we have developed shell scripts for moving files from the Pega internet SFTP server to our company-managed SFTP server.

I would like to check if there is an out-of-the-box (OOTB) solution within Pega that facilitates the automatic movement of all processed files from the Pega SFTP server to an archive folder with in the Pega sftp server.

Example: My shell script executes at 9:30am daily

Before 9:30am files present in Pega sftp server are as follows

sftp
└── OUTGOING_FILES
    ├── subfolder1
    │   ├── file1.txt
    │   └── file2.txt
    └── subfolder2
        ├── file3.txt
        └── file4.txt

Now after the shell script execution above mentioned files will be moved to intranet ftp server. After this I want to move all the files into a different folder called archive with file name ending with dateand time stamp in the Pega sftp server

archive
      └─── OUTGOING_FILES_20240101_0900
                ├── subfolder1
                │   ├── file1.txt
                │   └── file2.txt
                └── subfolder2
                    ├── file3.txt
                    └── file4.txt

@RAVI_TEJA_SAI

You can use Pega’s OORB archive wizard. Goto the Settings tab of the case type and check the enable archival checkbox and provide your own strategy.

@SohamM95

Thanks for your reply. I could see that the above solution you suggested is applicable only for archival of attachments that are related to a specific case type. But my requirement is related to files that are generated by activites/JS/QP and placed inside pega sftp server without any relation to a specific case type.

For instance, I will create a file named “LettersToPrint_Outgoing.csv” and place this into the “sftp/outgoing/letters” directory using the Pega default repository APIs. This file will contain all case data details that need to be transmitted to an external SFTP server for processing.

@RAVI_TEJA_SAI

I think we need to write a custom utility to achieve your requirements.

@RameshSangili

Thanks for your reply. Yes, there is no OOTB solution for this. We need to write a custom activity or data flow to move the files along with JS to move the files periodically.

Using Pega Cloud SFTP service
Using Pega Cloud File storage
Repository APIs (pega.com)