Renaming and changing file extensions are basic tasks in Windows. Sometimes we are in a situation to change file types of multiple files in a folder or in a directory or subdirectory. In this guide, you will learn different ways to change the extension of single or multiple files at once.
Choose the appropriate method to change the file type, just renaming and changing the file type might not work. Because it doesn’t change the format of the file. Let’s say changing the .doc file to .docx or .rtf to doc might work but .acc to .mp4 might not convert the actual format. So to actually convert the file format use the File Save As an option or a file converter on your computer or online.
Using Windows Rename
- Open up File Explorer, the keyboard shortcut to open File explorer in Windows+E.
In File Explorer, click the View option > Show and select File name extensions as shown below in the screenshot.
- Now, go to the file that you want to rename or change the extension.
- Select the file, click the Rename icon in the header.
- The selected part is the file name.jpg is the file’s extenstion.
- Change the file extension and hit enter. This will prompt you to confirm, click Yes to save it.
Use Associated Program to Save As
You can use the Save As an option to change the file extension. let’s say we want to change the file extension of a word document but you can open any file in their respective software.
- Open a Word file in Microsoft Word, click the File tab
- Select Save As option from the menu.
- Select the location to save the file like on the local computer.
- As you can see the current file format is .docx and we want to change it as .pdf file.
- Select the PDF format from the “save as type” drop-down menu
- Click the Save button to save your docx file as pdf format.
The above method is useful when you want to change the file extension single file. When you have lots of files and want to change the extension with ease then use the Command Prompt batch rename method.
Using Command Prompt for multiple files
For multiple files within a folder (batch)
- First, copy the path to the folder where you have all the files. Navigate to the folder, right-click on it, and select “Copy as path”
- Now, click the Start button or Windows key from the keyboard. Start typing
command prompt,and click the Command Prompt in the search results to open it.
- Right-click inside the command prompt window to paste the path you just copied and then hit Enter.
- Now, you are inside of that folder, as you can see below the command prompt location is changed.
- Let’s say I want to change all the .jpg files to .png format. Type this command:
rename *.jpg *.png
renameis the command
*means any file name
.jpgis the file extension that we want to change.
So when to type the command and hit enter to execute the command, all files that have the extension .jpg will be changed to .png regardless of any name.
NOTE: you can change the extension according to your requirements like r
ename *.doc *.docxand etc.
Multiple files and keep the original
- To rename all the files but keep the original safe, you need to use xcopy command.
xcopy *.jpg *.png
xcopy is a command,
*.jpg is the from extension and
*.png is a to extension.
So, once you execute this command, all the file extensions will be changed from jpg to png also saving the original jpg files.
For multiple files in a folder and all sub-folders
- This file-changing command can be used when you have folders within a folder and directory structure.
for /R %x in (*jpg) do ren “%x” *.png
Using Online Services
Most of the time just changing the extension of the file doesn’t change the actual format of the file. But If you are in a situation where you need to actually change the format of the file then you can use the Save As method mentioned above or any online service that allows you to change file types. You need to upload the file(s) convert it into the desired format and then download it.
- Open up the browser and search for the desired conversion, like jpg to png.
See also: Save a webpage as PDF file
How to Change the Default App for Each File Type.
- Press Windows+I from the keyboard to open the Windows Settings. In the Settings Window, type
default appsin the search box. Select
Choose a default app for each type of filein the search results.
- Please search for a file type in the search box, let’s say acc file type.
- If this file type is already associated with any program on your computer then it will show you. To change the default program click the program name like Media Player is the default player for acc file types. In case no program is associated with the file type then it will ask you to select the default program.
- In either case it will allow you to change or set the default program. Select on from the list and click OK.
- Click the More apps option to view the full list of programs.
Was that helpful?
If this guide was helpful for you or you are still in a different situation and want to ask anything please do leave a comment below.