I am trying to change all the files names in a current folder and I am trying to achieve this either by removing the files prefix (every file has a common prefix) or changing th
A much simpler solution is provided in
https://superuser.com/a/871799/497147
I copied it here for easier access.
Forget about complicated scripts for this.
rename
is a very old and never properly completed command. If you do not use it properly, the result might surprise you.For example to remove a prefix
abcd
fromabcd1.txt
,abcd2.txt
,abcd3.txt
etc. in order to get1.txt
,2.txt
,3.txt
simply userename "abcd*.txt" "////*.txt"
You need the same number of
/
as the number of initial characters you would like to remove.Do place double quotes for both arguments.