This was for another script, the one I use to make an offline snapshot of all my VMs, unlike the online snapshot script that runs daily and deletes snapshots older than 7 days the offline script doesn't run on a schedule because I have to shutdown all VMs first, I try to run it manually once a week or any time I need to shut them down for other reasons, like when there's an unRAID update, so I wanted an easy way to choose the previous offline snapshot as source for the incremental update and also delete the older one based on the date on the folder name, I know almost nothing about scripts but I'm good at googling, so I found a way of doing this automatically that although I bet it's not elegant or close to the best way, it suits my purpose.