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

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

[resolved] Help deleting folders having part of the name from my global variable

0683p000009MFgP.jpg       
Hey
I Need to delete a folder where the first 5 char is the same as my global variable. In this case my globalvariable is FlaVa. Now ist only going to delete the folder if the Name of the folder is exactly FlaVa "C:/Users/FreJe/Desktop/UserDelete/Profile/FlaVa"   
I need to rebuild the job so that it also delete folder that starts with FlaVa or where FlaVa is written without capital letters. This examples under should also be deleted.
"C:/Users/FreJe/Desktop/UserDelete/Profile/FlaVa.V2"       
"C:/Users/FreJe/Desktop/UserDelete/Profile/FlaVaNewFolder"  
"C:/Users/FreJe/Desktop/UserDelete/Profile/flava"                                      
  How can i do this?  

Labels (2)
1 Solution

Accepted Solutions
JR1
Creator III
Creator III

You can do this by using tFileList with the correct pattern (the string you chose in "Directory" in your tFileDelete component above suffixed with a "*" and by connecting the tFileDelete component with an "Iterate" connection to it. The Directory should then be something like ((String)globalMap.get("tFileList_1_CURRENT_FILEPATH")).

View solution in original post

1 Reply
JR1
Creator III
Creator III

You can do this by using tFileList with the correct pattern (the string you chose in "Directory" in your tFileDelete component above suffixed with a "*" and by connecting the tFileDelete component with an "Iterate" connection to it. The Directory should then be something like ((String)globalMap.get("tFileList_1_CURRENT_FILEPATH")).