Code: Select all
Avatar.2009.1080p.BluRay.DTS.x264.GROuP/Avatar.2009.1080p.BluRay.DTS.x264.GROuP.mkv -> '../../../../../../../cephfs/Media/Movies/Avatar (2009) [James Cameron]/Avatar (2009) [1080p x264 - 5.1 DTS Eng, 2.0 MP3 Eng - BluRay]-GROuP.mkv'
Avatar.2.2021.1080p.BluRay.DD+7.1.x264-FLaSH.mkv -> '../../../../../../cephfs/Media/Movies/Avatar 2 (2021) [James Cameron]/Avatar 2 (2021) [1080p x264 - 7.1 E-AC-3+Dep Eng, 2.0 AAC LC Eng - BluRay]-FLaSH.mkv'
Is there a robust way (software, script, anything) to do the rename while maintaining the link?
I guess this would mean, in practice, read original path and link, make the rename in the destination directory (consistently 4 levels deep - /cephfs/Media/Movies/<Movie Folder>), go back to original directory for the link (which could mean either <source dir> or <source dir>/<movie dir>), and recreate the symlink to the newly renamed file?