Reputation: 186
I have a complete directory like this,
C:\server\videos\images
and this images folder may contain several images. I want to delete this images folder if there are images available in it. so how can I do that in qt5.
I've seen some of the question similar like to this.but they aren't seem to solve my problem. I don't want to delete my entire directory or an image file.I just need to delete the image folder if there are images on it.So how can I do this?
thanx in advance.!
Upvotes: 0
Views: 403
Reputation: 21544
Check if the directory is empty or not (contains images or not): Check if directory is empty
Then, you can remove it + its content: Removing a non empty folder in Qt
Or only its content files: Delete all files in a directory
Upvotes: 1