Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
kakooo16
Creator
Creator

Checking If file is already downloaded SFTP in Local Directory and archive the treated Files

Hello , 

I want to check if file exists in my local directory then i don't download it because im talking about large files . 

Here is my job design  : 0683p000009MA8l.png

Then , put the treated files into an archive . 

Thanks in advance . 

Labels (2)
6 Replies
Anonymous
Not applicable

Before you download the file, you can use tFileExist to check if the same file name already exists in local system, and then use runIf connector to trigger next processing. eg:
.bababaa--tFtpFileList--iterate--tFileExist--runIf--tFTPGet....

on tFileExist, set the file path as:
"the local folder path/"+((String)globalMap.get("tFTPFileList_1_CURRENT_FILE"))

set the condition of runIf as:
!((Boolean)globalMap.get("tFileExist_1_EXISTS"))

Hope it helps you!

Regards
Shong
kakooo16
Creator
Creator
Author

Thanks @shong   it works perfectly and how about to archive the files in a new directory after beeing treated ? .

Anonymous
Not applicable

try tFileArchive component.

kakooo16
Creator
Creator
Author

without tFileCopy ?
Anonymous
Not applicable

yes, without tFileCopy, just set the Archive file path to another directory, I did't test it, let me know if you have any issues.

kakooo16
Creator
Creator
Author

In fact , i need to copy the files to a new directory so : my job looks like : 

0683p000009MA8v.png

 

Am i correct to configure this way my tFileArchive : 

In the file Archive section i ve put : ((String)globalMap.get("tFileList_1_CURRENT_FILE")).

 

@shong  If my workflow is correct let me know . 

Thanks for your advices