I'd like to combine two parts of code into a script that can me used to batch rename files. So far, I got this far:
file name before: 12345-[name]_ABC_12345.txt
file name after: name
for f in *.txt; do
mv "$f" "${f//]*}";
done
for f in *txt; do
echo mv "$f" "${f/*[/}";
done