Adobe Classic SFTP Activity



Hi Team, 


When i transfer (either download or upload) the files from 3rd party server to Adobe app server folders, we see that files gets appended with the timestamp at the end of the file. 

ex :- Starting transfer of 's' to 'filename_202001...a.csv'

But i dont want the file name to be changed or altered by including the timestamps to it. 


Please let me know if there is a way to restrict the suffix of timestamp to the file names. 



Adobe Campaign Classic

Accepted Solutions (1)

Accepted Solutions (1)






The only fix we found was to add a Javascript activity after the SFTP activity, with the below code:


var f = new File(vars.filename); // vars.filename will be automatically set by the previous SFTP activity
logInfo('Old path:', f.fullName); // log full path
var newPath = f.path +\d{14}[a-z]+(\.\w+)$/, '$1'); // generate new path by replacing "{an underscore}{14 digits}{a few lowercase letters}" by nothing
logInfo('New path:', newPath);
f.renameTo(newPath); // move file to the new path
vars.filename = newPath; // set ACC standard filename convention to the new name


This is not elegant but it works well. You may encapsulate it into a function in a Javascript code and call it from within your workflow.


The "File" doc can be found at

Answers (0)