Delete recognizes folders and changes the action