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

Announcements
Streamlining user types in Qlik Cloud capacity-based subscriptions: Read the Details
cancel
Showing results for 
Search instead for 
Did you mean: 
DrGenious
Creator
Creator

Replace a file

Hi,

I have a tHDFSExist and if the file already exists there is a tjava which does this code:

 

Files.move(Paths.get(context.path_file + "/" + ((String)globalMap.get("tWaitForFile_1_FILENAME"))), Paths.get(context.main_path + "/Exists/country/"+((String)globalMap.get("tWaitForFile_1_FILENAME"))));

I want not only to move the file but to replace it if there is the same. I used REPLACED_EXISTING but nothing happens. 

Labels (2)
2 Replies
TRF
Champion II
Champion II

Why don't you use tFileCopy for that?
DrGenious
Creator
Creator
Author

I haven't think of that. I prefer to use java code on my pipelines.