Hi all!
I have to change the file name to load of files,for example my files name are something like
newyork_usa.jpg
rome_ita.jpg
london_eng.jpg
...
I know that all the files are jpg and have an underscore and 3 digits after that.
I just want to remove the underscore and the 3 digits, so the new file list will be
newyork.jpg
rome.jpg
london.jpg
can anyone help me? maybe wildedit isn't the correct software to do that, have you an alternative sw to suggest?
please note that I've got files, this is not a text file with those name inside it!
thanks for your attentions!
how can I change file names using some kind of expression?
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
- Posts: 1
- Joined: Mon Nov 20, 2006 9:01 am
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
WildEdit and TextPad are editors designed for editing the contents of text files.
You can put the names of the files you want to rename into a file, called, say, renamejpg.bat, and then edit that file, using WildEdit or TextPad, and turn it into a batch file that you can run from the command line.
In WildEdit:
You can put the names of the files you want to rename into a file, called, say, renamejpg.bat, and then edit that file, using WildEdit or TextPad, and turn it into a batch file that you can run from the command line.
In WildEdit:
In TextPad:Find what: (.*)_...\.jpg
Replace with: ren $0 $1.jpg
[X] Regular expression
[X] Replacement format
Find what: (.*)_...\.jpg
Replace with: ren \0 \1.jpg
[X] Regular expression
This assumes you are using Posix regular expression syntax:
Configure | Preferences | Editor
[X] Use POSIX regular expression syntax
Excelent and free Ant Renamer (www.antp.be/software/renamer) could be your solution.