Hi,
I often have to rename a lot of files, and it's a pain for me to do 1 file at a time, I want to do a mass rename filenames by using 1 command, but I don't know how to, eg I want to rename 200 files in 1 directory by adding an extention to these files, which means I still keep the 200 files with the same name AND having extention of '.doc',
eg: MyServer/MyDir% ls
qwerty asdfgh
zxcvbn sdfhgj .....
Now I want to change all these files to become:
qwerty.doc asdfgh.doc
zxcvbn.doc sdfhgj.doc .....
I have tried to mv with grep, but it does not work that way, so I think I have to use either 'sed' or 'awk', but I am not good about that, could someone help me with an proper command please.
Thanks
I often have to rename a lot of files, and it's a pain for me to do 1 file at a time, I want to do a mass rename filenames by using 1 command, but I don't know how to, eg I want to rename 200 files in 1 directory by adding an extention to these files, which means I still keep the 200 files with the same name AND having extention of '.doc',
eg: MyServer/MyDir% ls
qwerty asdfgh
zxcvbn sdfhgj .....
Now I want to change all these files to become:
qwerty.doc asdfgh.doc
zxcvbn.doc sdfhgj.doc .....
I have tried to mv with grep, but it does not work that way, so I think I have to use either 'sed' or 'awk', but I am not good about that, could someone help me with an proper command please.
Thanks