1. How to move a file on SFTP from one input to Archive via technical workflow in ACC and 2. how to delete file from Archive after 30 days | Community
Skip to main content
Level 2
Jul 19, 2023 7:01 PM UTC
Solved

1. How to move a file on SFTP from one input to Archive via technical workflow in ACC and 2. how to delete file from Archive after 30 days

Hi All,

 

I am importing the file data from SFTP using file transfer activity loading into schema after loading i want to move those file to Archive folder after 30 days i want to delete it, kindly suggest me if we have any script please provide 

 

Thank You in advance

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
AkshayAnand
AkshayAnandAccepted solution
New Participant
Jul 20, 2023 12:23 PM UTC

Hi @rudrapraveenkumar 

 

To delete the file you can use the linux command "find (file sftp location) -type f -mtime +30 -delete" in the Javascript.

For Archival you can follow @parthasarathy  solution and also refer this documentation.

 

Regards

A

5 replies

Sukrity_Wadhwa
Employee
Aug 24, 2023 6:55 AM UTC

Hi @rudrapraveenkumar,

Were you able to resolve this query with the help of the given solutions or do you still need more help here? Do let us know. In case the given solutions were helpful, then kindly choose the one that helped you the most as the 'Correct Reply'.
Thanks!

Translate
Sukrity Wadhwa
LakshmiPravallika
New Participant
Jul 20, 2023 2:01 PM UTC

Hi @rudrapraveenkumar ,

 

Please check the permissions given to the "Archived" Folder Created in the Directory.

 

It should have all Read/Write/Execute Permissions. Also for testing the Archiving, if the File Transfer activity didn't work, you can alternatively use the below unix command as shown below in JavaScript activity:

 

execCommand('mv InputFileFullPath ArchivedFolderFullPath');

 

Regards,

Pravallika.

Translate
AkshayAnand
AkshayAnandAccepted solution
New Participant
Jul 20, 2023 12:23 PM UTC

Hi @rudrapraveenkumar 

 

To delete the file you can use the linux command "find (file sftp location) -type f -mtime +30 -delete" in the Javascript.

For Archival you can follow @parthasarathy  solution and also refer this documentation.

 

Regards

A

Translate
ParthaSarathy
New Participant
Jul 20, 2023 3:35 AM UTC

HI @rudrapraveenkumar ,

Create a folder for 'Archive' in your SFTP.

In File transfer activity > File Historization setting > storage directory > provide the sftp path for archive folder

Now once the file is processed, the file will be stored in the Archived folder

Translate
 ~  ParthaSarathy S~  Click here to join ADOBE CAMPAIGN USER GROUP for Quarterly In-person | Hybrid | Virtual Meetups
Level 2
Jul 20, 2023 10:23 AM UTC

Hi @parthasarathy,

 

As per above i have tried but the file is not moving to Archive folder even after the processed completed.

 

can you have any other suggestions

 

Thank You

Translate