0

I have 2800 files, all of whose names start with a four-digit number followed by " - ", and I want to delete all those leading numbers from all the files, leaving only the alphanumeric file names1.  How can I do this?
________________
1 Some of the filenames contain numerals after the " - ".

enter image description here

3
  • Yes, you could write a batch script. The fact this question has been asked before shows you've done no research. Can you share the script you've tried to write?
    – Dave
    Jul 29, 2015 at 7:51
  • 1
    Thanks for not deluging us with all 2800 filenames.  Even so, you gave us four or five times more than you needed to (i.e., eight to ten illustrative examples would have been plenty).  And, in the future, when you have purely textual information (like a list of filenames) that you want to include in a question (or an answer), try to post it as text rather than an image. Jul 29, 2015 at 10:38

2 Answers 2

2

PowerShell! Something like this should do what you want it to do. It will take teh first 7 characters off of the file name and rename it (7 characters is 4 digit number + 1 space + 1 hyphen + 1 space)

This relies on you having a definite pattern of "0000 - " before the filename and won't play nicely if it results in duplicate file names, but is a good jumping off point.

Get-ChildItem -LiteralPath "D:\bigfolderofstuff\" | ForEach { Rename-Item -LiteralPath $_.FullName -NewName ($_.Name).Substring(7) }

1
0

If you are running windows, In the past when I encounter similar problems I have used "Batch renaming tool" with considerable success.

Can be downloaded here, it is free and it works:

http://www.bulkrenameutility.co.uk/Main_Intro.php

Not the answer you're looking for? Browse other questions tagged .