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
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
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
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
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
Views
Replies
Total Likes
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
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.
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!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies