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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Delete empty folders

I am currently working on a job to remove files that are older than 6 months old from multiple folders and sub folders. I have got this portion to work correctly.

 

However, I would like to now remove any remaining folders that contain no files. (all of the files were deleted from the first portion of the job and the folder is now empty). I am able to remove the folders however I cannot figure out how to do this based on the content that either remains or does not within the folder, thus they are all deleted no matter what. 

 

0683p000009LvU7.png

Labels (2)
2 Replies
TRF
Champion II
Champion II

Use tFileList to check if there is at least 1 file or not. Is it what you're looking for?
Anonymous
Not applicable
Author

That would work I imagine if that is possible? I want to delete any Folder that is empty but make sure I keep folders that contain files (the files that remain should be newer than 6 months from my previous job)