cleanname does correct for each file

master
TiynGER 5 years ago
parent 983ccc4035
commit 669898d901

@ -11,11 +11,10 @@ do
if [ -f "$oldname" ]; then if [ -f "$oldname" ]; then
echo "renaming file $oldname to $newname" echo "renaming file $oldname to $newname"
cp "$oldname" "$newname" && rm "$oldname"; cp "$oldname" "$newname" && rm "$oldname";
else elif [ -d "$oldname" ]; then
echo "renaming directory $oldname to $newname" echo "renaming directory $oldname to $newname"
cp -r "$oldname/." "$newname" && rm -r "$oldname"; cp -r "$oldname/." "$newname" && rm -r "$oldname";
fi fi
fi fi
fi fi
done done

Loading…
Cancel
Save