Software that can remove numbers in front of 4000 file names/

Headbust

[H]ard|Gawd
Joined
Oct 10, 2003
Messages
1,585
I have a folder with a bunch of files in it, someone named each file correctly but put numbers before the actually name of the file, so it goes from 0 to 4000 before the actual file name, is there any software or way of editing this so i can direct a command to delete 0 through 4000 in one swipe without deleting the rest of the file name in the process?

thanks
 
are you using an operating system like windows, or one that has respect for itself?
 
I was using a program called The Rename.
It worked great for what I was doing and can do what you are asking.
 
Should be able to do what you need with Irfanview. The "batch rename" feature will do what you're attempting. Program is free, and great for resizing pictures and converting bmp to jpeg too.
 
assuming no other numbers in the filename (ie just at the beginning)

Code:
for f in *;do mv "$f" "${f##*[0-9]}"; done
 
assuming no other numbers in the filename (ie just at the beginning)

Code:
for f in *;do mv "$f" "${f##*[0-9]}"; done

You do have some concept that the overwhelming majority of people at this forum don't run any form of Linux, or any other type of *nix derivative OS where such a command would work directly from any terminal, right?

Pretty obvious from the OP's sig he's running Windows, and such a command - while it's elegant and functional - simply has no meaning or usefulness on such a platform... every time someone asks for a command to do something your responses automagically imply a *nix derivative OS of some kind...

Just curious. :D
 
You do have some concept that the overwhelming majority of people at this forum don't run any form of Linux, or any other type of *nix derivative OS where such a command would work directly from any terminal, right?

Pretty obvious from the OP's sig he's running Windows, and such a command - while it's elegant and functional - simply has no meaning or usefulness on such a platform... every time someone asks for a command to do something your responses automagically imply a *nix derivative OS of some kind...

Just curious. :D

You do have the concept that you can actually get BASH + Coreutils for windows right?
Most machines I touch gets it installed (via msysgit simply because I use GIT alot)

BASH + coreutils has gotten me out of more file manipulation problems then any oneshot app for windows has ever managed

plus letting people know what is out there is always good, or are you so dead against any other opinion but your own?
 
Yes cause this looks like a *NIX operating system ...


e5o2uc.png
 
You went through all that... do you really think an average Joe (not me, I assure you) would go that far when they need to do some simplistic file renaming in Windows? Do you? Really?

Oh, and about that minority thing...
 
"all that" ?
there were a couple of commands to make some test files
Then a bash one-liner to actually do the work
plus a final line to show all files changed

simple fact is you were wrong when you assumed I was talking about *NIX and you let your preduces get in the way of logical discussion, a discussion to suggest tools to rename a bunch of files. BASH + Coreutils is a very capable combination. It is upto the OP to chose (based upon what has been suggested) what is best for him/her. It is not your place to force your views on other people

I don't think people that come here can be classed as "average joe" now do you?
 
If that were true, would someone that comes here really need someone to find a file renaming tool for them? And "all that" means installing bash + those tools just to be able to issue such a command, and if so, the OP would probably never in 10 billion lifetimes ever need to use it again?
 
Children.... Play nicely. No one wants to see the BanHammer up close and in person.

The point is: Both of you have valid points.

eeyrjmr there are plenty of people here how do not have the aptitude to follow what you are suggesting. Some of us that do, were still confused by your first suggestion until you clarified what it was that you were suggesting a few posts later.

Joe Average please don't play the obvious troll. You jumped the gun with your conclusion, but given the details at the time, I completely understand why you assumed nix was involved.

OK now that we all agree that the sky is blue, we need not argue about what shade of blue the sky may be.
 
Last edited:
screw that nonsense, use the rename command :cool:
Code:
rename 's/\d{1,4}(.*)/$1/' *

assuming no other numbers in the filename (ie just at the beginning)

Code:
for f in *;do mv "$f" "${f##*[0-9]}"; done



if it were so simplistic, the job would have been done in less time than it took to make this thread asking how to do it.

But I admit, it is a simple job....for a self respecting operating system.

You went through all that... do you really think an average Joe (not me, I assure you) would go that far when they need to do some simplistic file renaming in Windows? Do you? Really?

Oh, and about that minority thing...
 
OP, ignore all this rubbish, I'm sure that way works but it's confusing, and really unecessary. Read my post, download the file and you will be fine.
 
You do have some concept that the overwhelming majority of people at this forum don't run any form of Linux, or any other type of *nix derivative OS where such a command would work directly from any terminal, right?

Pretty obvious from the OP's sig he's running Windows, and such a command - while it's elegant and functional - simply has no meaning or usefulness on such a platform... every time someone asks for a command to do something your responses automagically imply a *nix derivative OS of some kind...

Just curious. :D

Here's a few things for you to chew on. A lot of people on this forum do use Linux. It may not be the primary OS but they do use it.

Not everyone has sigs set to be viewable. On top of that, not everyone puts their OS in the sig. Furthermore, many people don't look at every last bit of someone's sig.

A lot of people on the forum also have multiple systems which ties into my first point. This also follows my second point in that the system the person is working on may not be the one in their sig.

As usual, you're making as ass out of yourself by attacking a perfectly valid response for absolutely no reason other than for some reason you don't like it.

 
I use 1-4a Rename to rename weirdly-named screenshots. You can set up rules on how to rename stuff, but it's all done in a GUI with a preview of how your rules will affect the filenames. It may not be the best, it's just the first one that I found that easily and quickly did what I wanted.
 
I once had to transfer about 30,000 of a relative's family photos from a Mac to a PC. It took me far too many hours of mysterious crashing to realize that Mac OS X allows / and \ in a filename while Windows XP does not. No, I was not being paid to do it, and not knowing basic stuff like that is why I don't get paid to do things like that. Several thousand of the files had / in the name. Managed to google a way to remove the slashes automatically using Mac OS X terminal.
 
Children.... Play nicely. No one wants to see the BanHammer up close and in person.

The point is: Both of you have valid points.

eeyrjmr there are plenty of people here how do not have the aptitude to follow what you are suggesting. Some of us that do, were still confused by your first suggestion until you clarified what it was that you were suggesting a few posts later.

Joe Average please don't play the obvious troll. You jumped the gun with your conclusion, but given the details at the time, I completely understand why you assumed nix was involved.

OK now that we all agree that the sky is blue, we need not argue about what shade of blue the sky may be.

supernanny :D
 
I guess you've never heard of Powershell? Might want to learn before making more assholish trolls in this forum.

I'm an avid Microsoft supporter as much as anyone else, but dangit I'd admit that was funny :D

I'd still disagree with the reason behind making it, and also making such a statement in the first place, but it did make me laugh.
 
simple fact is you were wrong when you assumed I was talking about *NIX

I'm not getting in the middle of that argument, but all I can say is you *did* post a *nix command. It's still a *nix command. Perfectly understandable why he'd come to that conclusion.
 
^^^ Yea I know... If you do, be sure to post back the pros/cons of each. I've occasionally wanted something but as you can see above, there's so many options it's ridiculous.
 
Back
Top