Thank you for your answer.
By using your solution I would not be able to get the names of the files, I guess. But I need them (including the path) to delete them afterwards.
I'm not happy with executing a script on and on also, but I'm using it for just ten of my users. They have stored a huge amount of pictures. That is why I'm constantly running in a script timeout.