How about put the all the file/dir in a list and do an iteration here? That will make it easy to extends the list in future?