Expand my Community achievements bar.

Adobe Campaign User Groups are live now. Join our Adobe Campaign User Groups and connect with your local leaders!

Update only if file was created/modified today?


Level 4

We're reading a file from SFTP. 

This file is called file.csv every day. We only need to load its data if it is a new file, e.g. created or modified today. 

Is it possible to check the metada of a file within Campaign? 

2 Replies


Community Advisor

Hello @ogonzalesdiaz 


You will have to use a javascript code before uploading the file to check if the file date is before today or not.


The code to get the modified date of a file is this:

var PATH=getOption("SFTP_UploadFolder");

var myFile = new File(FOLDER_PATH);
logInfo(myFile.lastModified); // this will return the modified date


     Find me on LinkedIn


Level 4

@_Manoj_Kumar_  actually the last line gives error: 

BAS-010034 Unable to change date of file 'path_of_file/file.csv.gz'.