Rename or remove prefix for multiple files to each ones’ number in Windows

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 from abcd1.txt, abcd2.txt, abcd3.txt etc. in order to get 1.txt, 2.txt, 3.txt simply use

rename "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.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)