Bot to delete old files

Thank you, just wanted to check something else as well. The excel has a column which will say if the folder in that location needs to be deleted or the files or both older than 30 days and in some cases the retention days can be different for each location. Shall I use switch to determine action based on no of retention days and if I need to delete both the folder or file or just them individually ?