Thanks a lot.You should use the rename function, in which you can pass certain rules with regular expressions in order to modify the bulk to how you want.
You must be registered for see links
Really easy to use.
rename '/^[0-9\_]+/' *
Thanks a lot.
But this doesn't seem to rename any file in my folder.
Code:rename '/^[0-9\_]+/' *
rename 's/^\d+ //' *
What is it returning? Could you give your list of file names and desired name to turn it in to?Doesn't work unfortunately.
This, otherwise all I can think is you have files that are likeWhat is it returning? Could you give your list of file names and desired name to turn it in to?
Sorry for the late reply.This, otherwise all I can think is you have files that are like
a1b2c3
b2b3c4
c3b4c5
And you want to remove the char?? Clarify please.
And when I try to run rename '/^[0-9\_]+/' * in the folder nothing happens.
for file in *; do mv -v $file $(echo $file | sed -r 's/^[0-9]*[0-9]_+//g'); done
[root@ecko test]# for file in *; do mv -v $file $(echo $file | sed -r 's/^[0-9]*[0-9]_+//g'); done
'10_test_file_10.png' -> 'test_file_10.png'
'11_test_file_11.png' -> 'test_file_11.png'
'12_test_file_12.png' -> 'test_file_12.png'
'13_test_file_13.png' -> 'test_file_13.png'
'14_test_file_14.png' -> 'test_file_14.png'
'15_test_file_15.png' -> 'test_file_15.png'
'16_test_file_16.png' -> 'test_file_16.png'
'17_test_file_17.png' -> 'test_file_17.png'
'18_test_file_18.png' -> 'test_file_18.png'
'19_test_file_19.png' -> 'test_file_19.png'
'1_test_file_1.png' -> 'test_file_1.png'
'20_test_file_20.png' -> 'test_file_20.png'
'2_test_file_2.png' -> 'test_file_2.png'
'3_test_file_3.png' -> 'test_file_3.png'
'4_test_file_4.png' -> 'test_file_4.png'
'5_test_file_5.png' -> 'test_file_5.png'
'6_test_file_6.png' -> 'test_file_6.png'
'7_test_file_7.png' -> 'test_file_7.png'
'8_test_file_8.png' -> 'test_file_8.png'
'9_test_file_9.png' -> 'test_file_9.png'