Rule-based file moving and renaming