How to rename the extensions of all files within a folder, including subfolders

5 Guardar archivo optimizado

How to rename the extensions of all files within a folder, including subfolders

Let’s say you need to change the extension name of a file from one extension to another, say jpg a png. It’s simple, of course! But what if you have multiple files that require an extension change? Or worse yet, what if these multiple files are also located within multiple folders, and sub-folders, within a single folder? Well, for a normal person, this can be a nightmare. But for a geek, definitely not. Now the question is, are you a geek or not. Good with The GEEK page here to help, you definitely are!

In this article, we explain through the batch scripting method how you can easily rename the extensions of all files within a folder, including sub-folders from one extension to another, of your choice.

Note: Note that in this example we have converted JPG files to PNG files. You can do other extension name changes like .mod a .mp4 etc

Read This Now:   How to Save Status Images or Videos in Whatsapp

Rename the extensions of all files within a folder

Paso 1: Click on the Search icon on the taskbar.

Paso 2: At Search barto write bloc and then click the Bloc application of the best match section.

Paso 3: When the Notepad app is open, copy and paste the following code snippet into it.

@ECHO OFF
PUSHD .
FOR /R %%d IN (.) DO (
cd "%%d"
IF EXIST *.from_extension (
REN *.from_extension *.to_extension
)
)
POPD

note: please replace with the old extension and with the new extension. In the example screenshot below, I am changing the extension from jpg to png. So myfrom_extension> it would be jpg and my it would be png. You can switch from any extension to any other extension. jpg a png it is just an example.

3 optimized code snippet

Stage 4: Once you are done, click on the Archive tab at the top. Then click on the Save as option.

4 Save as optimized

Paso 5: At Save as window, navigate to folder where your files are present, which need the extension change.

Read This Now:   Android with child control and lock

now give it a Name to your script file. I have given the name as jpg_a_png.bat. You can give any name, but the extension It should be .bat.

now choose save as type What All the files.

Hit the Save button once you are done.

5 Save optimized file

Paso 6: Next, go to location where you have saved the batch file. This is the folder that contains all your jpg files. This folder can contain subfolders that have jpg files. All jpg files inside all subfolders will now be converted to png.

double click about him batch file to run it.

Note: Note that before running the batch file, the files type is JPG.

6 Run Optimized

Paso 7: After execution, you can see that the type of the files has changed. change a PNG.

7 Changed to Png Optimized

Paso 8: If you go inside the subfolders and also inside the subfolders of the subfolders, you can see that the extensions of the files inside have also changed to PNG.

Read This Now:   4 Great Ways To Identify And Avoid Uniswap Scams

8 Sub Sub Sub Changed Optimized

That’s it. Now you have successfully changed from one extension to another for multiple files recursively with one click.

I hope you found the article useful.


Notice: ob_end_flush(): failed to send buffer of zlib output compression (1) in /home/gamefeve/bitcoinminershashrate.com/wp-includes/functions.php on line 5420

Notice: ob_end_flush(): failed to send buffer of zlib output compression (1) in /home/gamefeve/bitcoinminershashrate.com/wp-includes/functions.php on line 5420