Suppose I have files named:
93162-117352 - May 24, 2017 345 PM_16_163_student.csv
I want to rename it to be:
16_163_student.csv
How do I do this with rename?
Suppose I have files named:
93162-117352 - May 24, 2017 345 PM_16_163_student.csv
I want to rename it to be:
16_163_student.csv
How do I do this with rename?
You want to remove everything in the filename up to and including the first _. This is similar, but easier, to what was asked for in "change names of files consistently"
My solution would be (assuming a POSIX shell like bash):
for name in *.csv; do
mv -i -- "$name" "${name#*_}"
done
The ${name#*_} will remove everything up to and including the first _ in the name.
This is assuming the files you want to work on all matches the pattern *.csv.
I've added a -i so you get an option to abort if that would cause files to be lost (for instance because there's both a A_x.csv and B_x.csv).