Table of Contents
Rename the extensions of all files in the folder
Home Common Problem How to rename the extension of all files within a folder, including subfolders

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

Apr 14, 2023 pm 12:22 PM
extension name jpg double naming png

Suppose you need to rename a file's extension from one extension to another, such as jpg to png. It's easy, of course! But what if you have multiple files whose extensions need to be changed? Or worse, what if these multiple files are also located in multiple folders and subfolders, within a single folder? Well, for a normal person, this can be a nightmare. But for a geek, absolutely not. The question now is, are you a geek? Well, with the help of geekspage, you definitely are!

In this article, we explain how to easily rename the extension of all files within a folder, including subfolders of your choice, from one extension to another through a batch script method.

NOTE: Please note that in this example we have converted the JPG file to a PNG file. You can do other extension renaming such as .mod to .mp4 etc.

Rename the extensions of all files in the folder

Step 1: Click the Search icon on the taskbar.

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

Step 2: In the search bar, enter notepad, then select from BEST MATCH SECTION CLICK NOTEPAD APP.

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

advertise

Step 3: When the Notes application opens, copy and paste the following code snippet into it.

@ECHO OFFPUSHD .FOR /R %%d IN (.) DO (cd "%%d"IF EXIST *.from_extension (REN *.from_extension *.to_extension))POPD
Copy after login

Note: Please replace

from_extension> with the old extension and with the new extension. In the example screenshot below, I changed the extension from jpg to png. So my will be a jpg and my will be a png. You can change from any extension to any other extension. jpg to png is just an example.

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

Step 4: Once completed, click the File tab at the top. Then click on the Save as option.

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

Step 5: In the "Save as" window, navigate to need to change the extension The folder where the file named is located.

Now, give your script file a name. I have given the name jpg_to_png.bat. You can provide any name, but the extension should be .bat.

Now, select Save as type as All files.

Click the Save button when finished.

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

Step 6: Next, go to the location where the batch file is saved. This is the folder that contains all the jpg files. This folder can contain subfolders with jpg files. All jpg files in all subfolders will now be converted to png.

Double-click the batch file to execute it.

Note: Please note that before executing the batch file, the file type is JPG.

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

Step 7: After execution, you can see that the file type changes to PNG.

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

Step 8: If you go into subfolders and subfolders of subfolders, you can see that the file extensions inside also change became a PNG.

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

That’s all. Now you can successfully change the extension of multiple files from one extension to another with just one click.

The above is the detailed content of How to rename the extension of all files within a folder, including subfolders. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

The driver cannot load ene.sys on this device in Windows 11 The driver cannot load ene.sys on this device in Windows 11 May 05, 2023 am 09:13 AM

Many Windows 11 users have encountered the error message “The driver could not be loaded on this device (ene.sys)” which prevents the driver from loading on the system and is marked as vulnerable. However, this issue is mainly reported by users who have upgraded their PC to Windows 11. This error is closely related to drivers and files that get corrupted due to system operating system update issues. If you are encountering this “ene.sys” error every time you turn on your Windows 11 computer after an update, continue reading this article. Here you will find some troubleshooting methods that you can use if you see this error on your PC. Fix 1 – Install Optional Update Step 1. Use Windows+R group

4 Ways to Quickly Rename a Printer on Windows 11 4 Ways to Quickly Rename a Printer on Windows 11 Sep 11, 2023 pm 03:26 PM

If you have a lot of printers in your office, the printer list can be long and make getting work done tedious. What's more, multiple printers usually mean similar names, which can be a bit confusing. The last thing you want is to scroll through an endless list and still end up sending your print job to the wrong printer. Fortunately, you can solve all of these problems with a simple renaming trick, which we'll show you below. How do I rename my printer in Windows 11? 1. Using the Settings app tap the key and click Settings. Windows click Bluetooth and Devices and select Printers and Scanners. Select the printer you want to rename. Click Printer Properties. Navigate to the General tab, key

How to convert PNG to JPG on Windows 11 How to convert PNG to JPG on Windows 11 May 12, 2023 pm 03:55 PM

How to Convert PNG to JPG on Windows 11 On Windows 10 and 11, you can use Microsoft's built-in Paint app to quickly convert image files. To convert a PNG image to JPG on Windows 11, use the following steps: Open File Explorer and navigate to the PNG image you want to convert. Right-click the image and select Open With > Draw from the menu. Your photo or image opens in the Paint app. Note the file size at the bottom of the screen. To convert a file from PNG to JPG, click File and select Save As > JPEG Image from the menu. When the file resource

4 Quick Ways to Open Webp Images on Windows 11 4 Quick Ways to Open Webp Images on Windows 11 Sep 30, 2023 pm 02:13 PM

WebP or WebPicture is a modern image format developed by Google and has been widely used by the industry recently. These images are smaller than JPG, JPEG or PNG files, which increases page load speed and makes them valuable from an SEO perspective. But how to open WebP files in Windows 11? Given that it's a relatively new image format, first announced in March 2010, compatibility is bound to be an issue. Some photo editing software still don't support file extensions. But things change quickly! Does Windows 11 support WebP? Although WebP image files are not compatible with previous Windows 11, M

Fix: Can't open JPG files in Windows 11 Fix: Can't open JPG files in Windows 11 Apr 17, 2023 pm 12:37 PM

JPG is one of the most popular image file formats along with PNG. This is a lossy compressed image format ideal for websites. Therefore, many users save or convert images to JPG format. However, some users have stated that they are having issues opening JPG files in Windows 11 using the platform’s default Photos app. Therefore, these users cannot open, view and edit JPG format images in Windows 11. This is what one user said in a Microsoft forum post: When double-clicking a JPG file to open in Microsoft Photo, I receive the error The specified program cannot be found. This was purchased new about a month ago

How to fix file names or extensions that are too long in Windows 11? How to fix file names or extensions that are too long in Windows 11? Apr 22, 2023 pm 04:37 PM

Have you ever faced any issues while transferring files that prevented you from doing so? Well, many Windows users have recently reported that they faced issues while copying and pasting files into a folder, where an error was thrown saying “The file name of the destination folder is too long”. Additionally, some other Windows users expressed frustration when opening any file and said "the file name or extension is too long" and they were unable to open the file. This disappoints users by not allowing them to transfer files to any other folder. While analyzing the issue, we have come up with a series of solutions that may help alleviate the issue and allow users to transfer files easily. If you are in a similar situation, please see this post for more information. Source: https

Explorer.exe does not start on system startup [Fix] Explorer.exe does not start on system startup [Fix] Jun 03, 2023 am 08:31 AM

Nowadays, many Windows users start encountering severe Windows system problems. The problem is that Explorer.exe cannot start after the system is loaded, and users cannot open files or folders. Although, Windows users can open Windows Explorer manually using Command Prompt in some cases and this must be done every time the system restarts or after system startup. This can be problematic and is due to the following factors mentioned below. Corrupted system files. Enable fast startup settings. Outdated or problematic display drivers. Changes were made to some services in the system. Modified registry file. Keeping all the above factors in mind, we have come up with some that will surely help the users

How to open files without extension in Windows 11, 10 How to open files without extension in Windows 11, 10 Apr 14, 2023 pm 05:52 PM

Having a file doesn't mean much unless you know its extension. Some files have no extension. Most of the time, the extension is probably just hidden and you can easily find it from Windows File Explorer itself using the methods listed in Section 1. Even if the file doesn't actually have an extension, it can be easily found by following the methods listed in Section 2. Finally, once you know the file extension, you can follow the steps in Section 3 to find an appropriate application to open your file. So, this article is a complete solution to all your file extension problems. Hope you enjoy reading! Section 1: How to Determine if a File Has an Extension The first step in opening a file without an extension is to make sure that the file actually does not have an extension. this