# Command to remove first 10 letters of a filename?



## boobymilk (Jan 15, 2021)

Hello.
I need to rename a folder full of files, which have 10 letters/symbols that I need to remove.

I want to change from:
"ABC1234 - My file.rar" *to "My file.rar"*
"ABC1235 - Another File.rar" *to "Another File.rar"*
"ABC1236 - And another File.rar" *to "And another File.rar"*

So it is about removing the first 10 signs of the filename, including numbers, letters, 2 empty spaces and *-* symbols.
"ABC1234 - " this part needs to be removed. But it is always different for every file.


I am searching for a command to create a batch file, but I sadly didn't find a suitable command, because all I found was deleting always the same letters, but in my case the first 10 letters and numbers differ. I hope you understand what I intend to describe.

Thanks a lot for reading!


----------



## Corday (Mar 3, 2010)

Batch File Scripting


----------



## boobymilk (Jan 15, 2021)

Thank you! I didn't find this one, but it sure looks like it will work. I will try it soon!

Thanks for the quick help!


----------



## SpywareDr (Jun 15, 2013)

See the "Answer" on this page:



https://stackoverflow.com/questions/38124898/remove-x-characters-at-beginning-of-file-name-using-batch-scripting



Change the "3" in that "set x=3" to whatever number of characters you want removed.


----------



## boobymilk (Jan 15, 2021)

Thank you for the reply, but something really went wrong and now all filenames are messed up..
I had a backup, thankfully.

I don't know what went wrong, but it removed much more than 10 characters.

I try to check what I did wrong.


----------



## SpywareDr (Jun 15, 2013)

Tip: Practice in a temp directory with only a few files in it first.


----------

