how to change all these file names quickly
matt desbois last edited by
im sure one of you will know
i wanna change this part of all them “°Ë»ç_” to apple_ thank you i can pay
PeterJones last edited by
Sorry, Notepad++ is a text editor, not a filesystem-maintenance/renaming utility.
andrecool-68 last edited by
Total Commander \ Multi Rename Tool
guy038 last edited by guy038
Matt, here is a solution, which only needs our beloved editor ;-))
chcp 65001and hit the Enter key
=> This command changes your current encoding to the universal
UTF-8encoding and allows a correct representation of any character
- Type in
cd /d %USERPROFILE%\progress\smand hit the Enter key
=> You should have been moved to the folder containing your ACT and SPR files ( I used the path, seen on your picture ! )
- Type in
dir /b /od > Rename.bat
=> A list of all names of the files, of current folder, are re-written, sorted by increasing date of modification, in a file named
Note : If your folder contains other files not desired, you may prefer the syntax
dir /b /od *.ACT *.SPR > Rename.bat
Rename.batfile, in N++
Now, let’s suppose that its contents are as below :
xyzt12345.act xyzt12345.spr xyzt 123.act xyzt 123.spr xyzt°Ë»ç_.act xyzt°Ë»ç_.spr xyzt12345678.act xyzt12345678.spr
And assuming that you want to change, for instance, the text
xyzt, in each file, so the first
4characters. Then :
Open the Replace dialog (
Ctrl + H)
}(.+)( Of course, modify the 4 digit with the exact number of chars to change ! )
Regular expressionsearch mode
Click on the
You should get the expected below :
ren "xyzt12345.act" "Replacement_Text12345.act" ren "xyzt12345.spr" "Replacement_Text12345.spr" ren "xyzt 123.act" "Replacement_Text 123.act" ren "xyzt 123.spr" "Replacement_Text 123.spr" ren "xyzt°Ë»ç_.act" "Replacement_Text°Ë»ç_.act" ren "xyzt°Ë»ç_.spr" "Replacement_Text°Ë»ç_.spr" ren "xyzt12345678.act" "Replacement_Text12345678.act" ren "xyzt12345678.spr" "Replacement_Text12345678.spr"
Note that I embedded all filenames, between double quotes, because of possible space characters, in them !
- Now, add the line
@echo OFF, at the very beginning of this batch file, to prevent the echo of commands on the console window
Hence the final text :
@echo OFF ren "xyzt12345.act" "Replacement_Text12345.act" ren "xyzt12345.spr" "Replacement_Text12345.spr" ren "xyzt 123.act" "Replacement_Text 123.act" ren "xyzt 123.spr" "Replacement_Text 123.spr" ren "xyzt°Ë»ç_.act" "Replacement_Text°Ë»ç_.act" ren "xyzt°Ë»ç_.spr" "Replacement_Text°Ë»ç_.spr" ren "xyzt12345678.act" "Replacement_Text12345678.act" ren "xyzt12345678.spr" "Replacement_Text12345678.spr"
Save all the modifications of the batch file
Rename.baton the console window and hit the Enter key to start the renaming process ! That’s all ;-))
Seemingly, according to what you said, the exact regex S/R, that you need, should be, practically :
rossjparker last edited by
@andrecool-68 - +1 for Total Commander. An indispensable utility!
guy038 last edited by guy038
Hi, @matt-desbois and All,
I didn’t really test the generated batch file
Rename.bat, when writing my previous post. So, I’m very sorry because, after tests, this morning, it does not work at all :-((
After further tests, I realized that, using the
UTF-8code page, in the current console window, prevents from the good execution of the batch file :-((
So, prefer the DOS command
chcp 1252, which sets current encoding to Windows
CP 1252(Western Europe). According to your localization, may be you’ll have to choose, instead, one of those, listed below :
CP 1250(Central Europe)
CP 1252(Western Europe)
CP 1258(Viet Nam)
Then, after the DOS command
dir /b /od > Rename.batand the opening in Notepad++, the current encoding of the
Rename.batbatch file should be
ANSI, in the status bar !
The subsequent operations are unchanged and should result to the correct renaming !
From this article, about different File rename software :
8of them and, finally, after intensive testing, my preference is for the powerful free renamer software, called
Rename Master. Refer below :
It’s a portable program, with optional installer, which is designed from Windows XP through Windows 10
And for downloading the last
Prahlad-Makwana4145 last edited by
To rename multiple files, use this command syntax and press Enter:
ren .ext1 ???-new_filename_part.
Command syntax example:
ren .jpg ???-hikingTrip.