Created
November 30, 2014 13:28
-
-
Save guypursey/ad548f7bf935ac7a2bf3 to your computer and use it in GitHub Desktop.
Rename folders and main file within to new convention.
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
for file in $(find * -maxdepth 0 -type d); do | |
newdirnm=${file:0:4}${file:5:2}${file:8:2}${file:11:2}${file:14:2}-${file:17} | |
mv $file $newdirnm | |
cd ./$newdirnm | |
git mv "$file".md "$newdirnm".md | |
git commit -m "Optimised filename for SEO." | |
cd .. | |
../autoscrp.sh $newdirnm | |
echo $newdirnm | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment