![]() ![]() ![]() So, prefer the DOS command chcp 1252, which sets current encoding to Windows CP 1252 ( Western Europe). So, I’m very sorry because, after tests, this morning, it does not work at all :-((Īfter 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 :-(( I didn’t really test the generated batch file Rename.bat, when writing my previous post. ![]() Seemingly, according to what you said, the exact regex S/R, that you need, should be, practically : Type in Rename.bat on the console window and hit the Enter key to start the renaming process ! That’s all -)) Save all the modifications of the batch file Rename.bat Now, add the line OFF, at the very beginning of this batch file, to prevent the echo of commands on the console window.Note that I embedded all filenames, between double quotes, because of possible space characters, in them ! Ren "xyzt 123.spr" "Replacement_Text 123.spr" Ren "xyzt 123.act" "Replacement_Text 123.act" You should get the expected below : ren "xyzt12345.act" "Replacement_Text12345.act" Select the Regular expression search mode ![]() SEARCH (?-s)^.(. ) ( Of course, modify the 4 digit with the exact number of chars to change ! ) Now, let’s suppose that its contents are as below : xyzt12345.actĪnd assuming that you want to change, for instance, the text xyzt, in each file, so the first 4 characters. Note : If your folder contains other files not desired, you may prefer the syntax dir /b /od *.ACT *.SPR > 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 => You should have been moved to the folder containing your ACT and SPR files ( I used the path, seen on your picture ! )
0 Comments
Leave a Reply. |