how to change all these file names quickly



  • im sure one of you will know
    https://ibb.co/1bYyQFT
    i wanna change this part of all them “°Ë»ç_” to apple_ thank you i can pay



  • Sorry, Notepad++ is a text editor, not a filesystem-maintenance/renaming utility.



  • @matt-desbois
    Total Commander \ Multi Rename Tool



  • Hello @matt-desbois, @PeterJones, @andrecool-68 and All,

    Matt, here is a solution, which only needs our beloved editor ;-))

    • Open a cmd console window

    • Type in chcp 65001 and hit the Enter key

    => This command changes your current encoding to the universal UTF-8 encoding and allows a correct representation of any character

    • Type in cd /d %USERPROFILE%\progress\sm and 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 Rename.bat

    Note : If your folder contains other files not desired, you may prefer the syntax dir /b /od *.ACT *.SPR > Rename.bat

    • Start Notepad++

    • Open the Rename.bat file, 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 4 characters. Then :

    • Open the Replace dialog ( Ctrl + H )

    • SEARCH (?-s)^.{4}(.+) ( Of course, modify the 4 digit with the exact number of chars to change ! )

    • REPLACE ren\x20"$0"\x20"Replacement_Text\1"

    • Tick the Wrap around option

    • Select the Regular expression search mode

    • Click on the Replace All button

    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.bat

    • Exit Notepad++

    • Type in Rename.bat on the console window and hit the Enter key to start the renaming process ! That’s all ;-))

    Best Regards,

    guy038

    P.S. :

    Seemingly, according to what you said, the exact regex S/R, that you need, should be, practically :

    • SEARCH (?-s)^.{5}(.+)

    • REPLACE ren\x20"$0"\x20"apple_\1"



  • @andrecool-68 - +1 for Total Commander. An indispensable utility!



  • 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-8 code 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 :

    • Windows CP 1250 (Central Europe)
    • Windows CP 1251 (Cyrillic)
    • Windows CP 1252 (Western Europe)
    • Windows CP 1253 (Greek)
    • Windows CP 1254 (Turkish)
    • Windows CP 1255 (Hebrew)
    • Windows CP 1256 (Arabic)
    • Windows CP 1257 (Baltic)
    • Windows CP 1258 (Viet Nam)
    • Windows CP 874 (Thai)

    Then, after the DOS command dir /b /od > Rename.bat and the opening in Notepad++, the current encoding of the Rename.bat batch file should be ANSI, in the status bar !

    The subsequent operations are unchanged and should result to the correct renaming !

    Cheers,

    guy038

    P.S. :

    From this article, about different File rename software :

    https://windowsreport.com/file-rename-software/

    I downloaded 8 of them and, finally, after intensive testing, my preference is for the powerful free renamer software, called Rename Master. Refer below :

    http://www.joejoesoft.com/vcms/108/

    It’s a portable program, with optional installer, which is designed from Windows XP through Windows 10

    And for downloading the last v3.14 version :

    http://www.joejoesoft.com/cms/file.php?f=userupload%2F8%2Ffiles%2Frmv314.zip



  • To rename multiple files, use this command syntax and press Enter:

    ren .ext1 ???-new_filename_part.

    Command syntax example:

    ren .jpg ???-hikingTrip.


Log in to reply