Created
December 1, 2015 15:55
-
-
Save guyoun/47c98593699ca02ea0f4 to your computer and use it in GitHub Desktop.
This script is to recover filenames changed by Synology. It appended "DiskStation_-XXX-XX-XXXX-XXXX_Conflict" to filenames.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -name '*_DiskStation_*_Conflict*' | while read line; do | |
echo "Processing file '$line'" | |
mv "$line" "$(echo "$line" | sed -r 's/_DiskStation_[a-zA-Z]{3}-[0-9]{2}-[0-9]{4}-[0-9]{4}_Conflict//')" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment