Windows rename all files in folder

Rename file from command line [CMD]

We can use the command rename to rename files from windows command prompt(CMD). Find below syntax of the command with examples.

Syntax of rename command:

After executing the above command we’ll have file2.doc in the folder d:\data

Ren is alias for rename , so both refer to the same command.

Errors:

  1. If the files is being used by a program, then rename command fails with below error.
  2. You also need to have sufficient privileges to rename the file.
  3. Rename changes just the file name, it does not convert a file from one type to another. For example, if you rename a file from mp4 to mp3 extension, it does not change the file format. Renaming a doc file ‘mydocument.docx’ to ‘mydocument.pdf’ does not make the file readable in Acrobat Reader.

Does the command have to be executed in the root directory, or can it be done in a subdirectory that is in the root directory? Also, can a directory be renamed (EXAMPLE: renaming Dell.dir to Newname.dir)?

yes, you can run the command (for that matter, any other windows command) from any folder, it need not be root folder. And yes, ren works for directories too. There’s a separate post for this – http://www.windows-commandline.com/rename-directory-from-command-line/

this command gives repeating of filename when there are more then 40 files in the folders ?
any solution for renaming 100s of file .

i have
4299999940_M_harsha.png these type of files in several sub folders, with similar name structure(42 as first part of name, 40_M_harsha as last part of name.. in between 6digits(which may contain 42 and 40 also.in this example it has 999999))
i have to rename it as 99999..i.e, remove first and last part of file name which is common for all files in the subfolder
another examples:
4292345640_M_harsha.png -> 923456
4291424040_M_harsha.png -> 914240
could u please help

how do I rename a file by keeping the last 20 characters. I have random file names however the last 20 characters are what I want to keep. They are dates and a document ID.

filename too long cannot rename Please now setup new rename

I use, Batch Rename Files Tool. You can easily found hier BatchRenameFiles.org that allows you to quickly rename all the files in a specified directory.

Simple stuff. Been there and done that but I have a mess of files that contain a “%20” or several in the filename. I need help to sort this out. My REXX program has produced a batch file containing lines like these:

1.JPG” corn_escaLator.jpg
ren “CHOCO%

1.JPG” choco_Lady.jpg
ren “CAT%20

4.JPG” cat_wet_getting_bathed.jpg
ren “CAT%20

3.JPG” cat_burrito.jpg
ren “CAT%20

2.JPG” cat_bra.jpg
ren “CAT%20

1.JPG” cat_bite_nose.jpg
ren “BOOTY%

1.JPG” booty_cake.jpg
ren “BIRD%2

2.JPG” bird_watersLide.jpg
ren “BIRD%2

1.JPG” bird_mouth_dog.jpg
ren “BIG%20

1.JPG” big_mac.jpg
ren “BANK%2

1.JPG” bank_cake.jpg
ren “ANGEL%

Suffice to say it isn’t working as intended. I get tons of
“The system cannot find the file specified.” messages.

I prefer not to use the powershell whether I have it or not in case I need to run this in a more primitive Windows. I have tried rename instead of ren and without double quotes. I have administrator privileges.

I am running Windows7 32-bit.

GOOD, IT WORKED FOR ME

I use windows 10, and I did the steps, even in the location but it ‘couldn’t find the file specified.’ Please help.

How to rename all files in a folder in Windows 10

Renaming multiple or all the files in a folder can be a tedious, repetitive task in Windows 10. However, there are some tricks you can use to save time and rename a batch of files, either using a keyboard shortcut, from File Explorer’s ribbon, or from the right-click menu. This tutorial illustrates how to rename a group of files in one go in Windows 10:

How to rename multiple files in a folder with a keyboard shortcut

First, open File Explorer and browse to the folder containing the files you wish to rename. Select the first file and then press F2 on your keyboard. This rename shortcut key can be used both to speed up the renaming process or to change the names for a batch of files in one go, depending on the desired results.

On some laptops, the F-keys have multiple purposes, so pressing the F2 key might lower your sound volume or dim your screen instead. If that is the case for you, use the Fn key found in the lower-left corner of your keyboard. Try pressing the key once to enable function keys and then pressing F2, or hold the Fn key down while you press F2.

The file’s name can now be edited, so type in the new name.

When you are done, instead of pressing Enter to save your changes, press the Tab key to jump to the next file. The changes for the first file are applied. The name of the next file is automatically highlighted, and it can now be edited.

Repeat the process until you finish renaming all the files you want. If you come across a file that you don’t want to rename, press Tab to skip it and keep its current name. Press Shift + Tab on your keyboard to rename the previous file.

NOTE: If the files you work with are sorted by Name, they may change their position after you rename them, so the process won’t be continuous and smooth. Try to sort the files by some other criteria, such as Date or Size, to keep their position after renaming them.

How to rename all files in a folder with a keyboard shortcut

If you are pressed for time, and you don’t need the names for your files to be all that different, you can rename all the files in one go. Select all the files you want to rename and press F2 on your keyboard. This lets you insert a name in the name field under one of the highlighted files. Type in the new name and press the Enter key.

The selected files are all automatically renamed with the chosen name and assigned a number at the end, as seen in the screenshot below.

Alternate ways to rename the files in a folder one by one

If you need entirely different names for your files, you can also use other methods instead of the keyboard shortcut above.

You can select the first file and then click or tap on its name again to type in a new name. Use Tab, as explained above, to jump to the next file and rename multiple files faster.

You can also right-click or press-and-hold on the first file in the group you want to rename to open a contextual menu. Click or tap on Rename. This lets you rename the first file, and then you can use Tab to do the rest.

You can also use the Home tab in File Explorer to rename multiple files. Select the file you want to start with and press the Rename button. Rename the first file and then use Tab to quickly choose new names for the rest of them.

Alternate ways to rename all the files in a folder in one batch

If you’re not too picky about the names of your files, there are two more methods you can use to rename them all on one go. Start by selecting all the files that need renaming. Right-click or press-and-hold on any of them, and then click or tap Rename from the contextual menu.

Читайте также:  Замена стандартного блокнот для windows

Enter the new name for your files to have them instantly renamed with your choice. A number is added in brackets to help you differentiate between them. You can also select the files and use the Rename button in File Explorer’s Home tab. Add a new name and press Enter for the same result.

TIP: Use the keyboard shortcut Control + A to instantly select all the files in a folder.

How do you rename multiple files?

All the methods described above can be applied on all the items contained by a folder, whether they are files, shortcuts, other folders, etc. Naming your files and folders in a way that makes sense to you helps you keep them organized and increases your productivity. We feel the F2 keyboard shortcut is the fastest way to rename a bunch of files, whether you are trying to add different names for each of them or change all their names in one go. What about you? Which method do you prefer? Let us know in the comments.

Rename all files in a directory with a Windows batch script

How would I write a batch or cmd file that will rename all files in a directory? I am using Windows.

2 Answers 2

A FOR statement to loop through the names (type FOR /? for help), and string search and replace (type SET /? for help).

UPDATE — 2012-11-07

I’ve investigated how the RENAME command deals with wildcards: How does the Windows RENAME command interpret wildcards?

It turns out that this particular problem can be very easily solved using the RENAME command without any need for a batch script.

The number of characters after the _ does not matter. The rename would still work properly if 120×90 became x or xxxxxxxxxx . The important aspect of this problem is that the entire text between the last _ and the . is replaced.

As of Windows 7 you can do this in one line of PowerShell.

Explanation

powershell -C «. » launches a PowerShell session to run the quoted command. It returns to the outer shell when the command completes. -C is short for -Command .

gci returns all the files in the current directory. It is an alias for Get-ChildItem .

| % <. >makes a pipeline to process each file. % is an alias for Foreach-Object .

$_.Name is the name of the current file in the pipeline.

($_.Name -replace ‘120×90′, ’67×100’) uses the -replace operator to create the new file name. Each occurrence of the first substring is replaced with the second substring.

rni changes the name of each file. The first parameter (called -Path ) identifies the file. The second parameter (called -NewName ) specifies the new name. rni is an alias for Rename-Item.

Rename multiple files in a folder, add a prefix (Windows)

I’d like to batch rename files in a folder, prefixing the folder’s name into the new names. i.e. files in C:\house chores\ will all be renamed house chores — $old_name .

8 Answers 8

Option 1: Using Windows PowerShell

Open the windows menu. Type: «PowerShell» and open the ‘Windows PowerShell’ command window.

Goto folder with desired files: e.g. cd «C:\house chores» Notice: address must incorporate quotes «» if there are spaces involved.

You can use ‘dir’ to see all the files in the folder. Using ‘|’ will pipeline the output of ‘dir’ for the command that follows.

Notes: ‘dir’ is an alias of ‘Get-ChildItem’. See: wiki: cmdlets. One can provide further functionality. e.g. ‘dir -recurse’ outputs all the files, folders and sub-folders.

What if I only want a range of files?

Instead of ‘dir |’ I can use:

For batch-renaming with the directory name as a prefix:

Option 2: Using Command Prompt

In the folder press shift+right-click : select ‘open command-window here’

If there are a lot of files, it might be good to add an ‘@echo off’ command before this and an ‘echo on’ command at the end.

The problem with the two Powershell answers here is that the prefix can end up being duplicated since the script will potentially run over the file both before and after it has been renamed, depending on the directory being resorted as the renaming process runs. To get around this, simply use the -Exclude option:

This will prevent the process from renaming any one file more than once.

Free Software ‘Bulk Rename Utility’ also works well (and is powerful for advanced tasks also). Download and installation takes a minute.

See screenshots and tutorial on original website.

I cannot provide step-by-step screenshots as the images will have to be released under Creative Commons License, and I do not own the screenshots of the software.

Disclaimer: I am not associated with the said software/company in any way. I liked the product for my own task, it serves OP’s and similar requirements, thus recommending.

This worked for me, first cd in the directory that you would like to change the filenames to and then run the following command:

I was tearing my hair out because for some items, the renamed item would get renamed again (repeatedly, unless max file name length was reached). This was happening both for Get-ChildItem and piping the output of dir. I guess that the renamed files got picked up because of a change in the alphabetical ordering. I solved this problem in the following way:

This «locks» the results returned by Get-ChildItem in the variable $dirs and you can iterate over it without fear that ordering will change or other funny business will happen.

Dave.Gugg’s tip for using -Exclude should also solve this problem, but this is a different approach; perhaps if the files being renamed already contain the pattern used in the prefix.

(Disclaimer: I’m very much a PowerShell n00b.)

How to batch rename multiple files on Windows 10

Source: Windows Central

On Windows 10, renaming a single file is straightforward, but the problem arises when you need to change the name or extension to a long list of files in a particular folder location.

Although you can always use third-party tools (including Microsoft PowerToys) to speed up the process, Windows 10 ships with several ways to make it easier to change the name of files using File Explorer, PowerShell, and Command Prompt.

In this Windows 10 guide, we will walk you through three ways to rename multiple files, including changing the extension, without the need to resource to third-party tools.

How to rename multiple files using File Explorer

If you want to rename one or multiple files on Windows 10, File Explorer provides the quickest methods.

Rename multiple files one at a time

To rename multiple files with the «Tab» key, use these steps:

Open File Explorer.

Quick tip: You can quickly open File Explorer with the icon in the taskbar, using the Windows key + E keyboard shortcut, or from the Start menu, click the File Explorer icon from the left rail.

Select the Details view.

Source: Windows Central

Click the Rename button.

Source: Windows Central

Quick tip: You can also press the F2 button. Right-click the file and select the Rename option from the context menu. Or you can click the file once and slowly click the name again to trigger the rename action.

Press the Tab key again to jump and trigger the next rename.

Quick tip: You can keep pressing the Tab key to skip the file and continue renaming other files.

  • Continue repeating steps No. 9 and 10 to rename all the files.
  • Once you complete these steps, keep pressing the «Tab» key to continue renaming files.

    Rename multiple files at once

    To rename multiple files in bulk with the same name structure, use these steps:

    1. Open File Explorer.
    2. Browse to the folder with the files to change their names.
    3. Click the View tab.

    Select the Details view.

    Source: Windows Central

    Click the Select all button.

    Source: Windows Central

    Quick tip: You can also use the Ctrl + A keyboard shortcut to select all files. You can press and hold the Ctrl key and then click each file to rename. Or you can choose the first file, press and hold the Shift key, and then click the last file to select a group.

    Type the new file name and press Enter.

    Source: Windows Central

    After you complete the steps, the selected files will be renamed using the same naming structure with a count number between parentheses to make each file name different. For instance, summer_trip_2021 (1).jpg and summer_trip_2021 (2).jpg.

    If you made a mistake, you could use the Ctrl + Z keyboard shortcut to quickly undo the changes. Alternatively, you can click the menu button from the title bar and select the Undo button.

    How to rename multiple files using PowerShell

    Alternatively, you can also use PowerShell to rename one or multiple files. Although using this tool, there are many ways to manipulate files, the instruction in this guide are only meant to get started with the most common scenarios.

    Rename single file

    To rename only one file using PowerShell, use these steps:

    1. Open Start.
    2. Search for PowerShell and click the top result to open the app.

    Type the following command example to navigate to the folder with the files to rename and press Enter:

    In the command, replace PATH\TO\FOLDER with the actual path to the location.

    For example, this command navigates the «files» folder inside «Documents»:

    Source: Windows Central

    (Optional) Type the following command to view a listing of the files in the location and press Enter:

    Type the following command to change the name of a single file and press Enter:

    Rename-Item «OLD-FILE-NAME.EXTENSION» «NEW-FILE-NAME.EXTENSION»

    In the command, make sure to specify the old and new file name and extension. The quotation marks are only required if the name includes spaces.

    For example, renames the file to «hiking_trip_2021_notes.txt»:

    Rename-Item summer_trip_21_notes.txt hiking_trip_2021_notes.txt

    Source: Windows Central

  • Repeat step No. 5 to continue renaming other the remaining files.
  • Once you complete the steps, the command will change the name of the file you specified.

    Rename multiple files in bulk

    To rename multiple files in bulk, when the name structure is not important, use these steps:

    1. Open Start.
    2. Search for PowerShell and click the top result to open the app.

    Type the following command example to navigate to the folder with the files to rename and press Enter:

    In the command, replace PATH\TO\FOLDER with the actual path to the location.

    For example, this command navigates the «files» folder inside «Documents»:

    Source: Windows Central

    (Optional) Type the following command to view a listing of the files in the location and press Enter:

    Type the following command to rename multiple files in bulk and press Enter:

    In the command, replace «NEW-FILE-NAME» with the actual structure name you want to use.

    For example, this command renames images with a «.jpg» extension using the same («beach-trip-2021-«) naming structure and appends a different number at the end of the name:

    Source: Windows Central

    After you complete these steps, all the files with the specified format will be renamed using the naming structure you specified.

    Trim multiple file names

    To make file names shorter, or trim part of the names by an «N» number of characters on Windows 10, use these steps:

    1. Open Start.
    2. Search for PowerShell and click the top result to open the app.

    Type the following command example to navigate to the folder with the files to rename and press Enter:

    In the command, replace PATH\TO\FOLDER with the actual path to the location.

    For example, this command navigates the «files» folder inside «Documents»:

    Source: Windows Central

    (Optional) Type the following command to view a listing of the files in the location and press Enter:

    Type the following command to rename files using shorter names and press Enter:

    ls | Rename-Item -NewName

    In the command, inside «$_.BaseName.length-N» update the value of «N» to specify the number of characters that you want to remove.

    For example, this command trims the name of your files by eight characters:

    ls | Rename-Item -NewName

    Source: Windows Central

    Once you complete these steps, you will end up with shorter file names depending on the length you specified in the command.

    Delete part of the name from multiple files

    To remove part of the file name on multiple files with PowerShell, use these steps:

    1. Open Start.
    2. Search for PowerShell and click the top result to open the app.

    Type the following command example to navigate to the folder with the files to rename and press Enter:

    In the command, replace PATH\TO\FOLDER with the actual path to the location.

    For example, this command navigates the «files» folder inside «Documents»:

    Source: Windows Central

    (Optional) Type the following command to view a listing of the files in the location and press Enter:

    Type the following command to remove part of the file name and press Enter:

    ls | Rename-Item -NewName

    In the command, replace «OLD-FILE-NAME-PART» with the actual part of the name you want to replace.

    For example, this command removes the word «trip» from the name of all files in the folder:

    ls | Rename-Item -NewName

    Source: Windows Central

    After you complete the steps, the command will remove the part of the file name you specified in the command.

    Replace part of the name from multiple files

    To rename the same part of the file name, use these steps:

    1. Open Start.
    2. Search for PowerShell and click the top result to open the app.

    Type the following command example to navigate to the folder with the files to rename and press Enter:

    In the command, replace PATH\TO\FOLDER with the actual path to the location.

    For example, this command navigates the «files» folder inside «Documents»:

    Source: Windows Central

    (Optional) Type the following command to view a listing of the files in the location and press Enter:

    Type the following command to replace part of file name and press Enter:

    ls | Rename-Item -NewName

    In the command, replace «OLD-FILE-NAME-PART» and «NEW-FILE-NAME-PART» with the old and new part of the file name.

    For example, this command replaces the word «vacation_» for «hiking_trip_» on the file name:

    ls | Rename-Item -NewName

    Source: Windows Central

    Once you complete these steps, the command will modify the file names with the replacement you specified in the command.

    Remove spaces from multiple files

    Spaces as part of the file name can sometimes cause problems, even more, when using a command console. If you have files that contain spaces in their names, you can use PowerShell to replace the character for a visual separator, such as a dash or underscore symbol.

    To remove and replace spaces with underscores in file names, use these steps:

    1. Open Start.
    2. Search for PowerShell and click the top result to open the app.

    Type the following command example to navigate to the folder with the files to rename and press Enter:

    In the command, replace PATH\TO\FOLDER with the actual path to the location.

    For example, this command navigates the «files» folder inside «Documents»:

    Source: Windows Central

    (Optional) Type the following command to view a listing of the files in the location and press Enter:

    Type the following command to remove spaces from file name and press Enter:

    ls | Rename-Item -NewName

    In the command, make sure to replace «SEPARATOR» with the symbol you want to use instead of a space.

    For example, this command replaces spaces with underscores in all the files:

    ls | Rename-Item -NewName

    Source: Windows Central

    After you complete the steps, the file names’ spaces will be replaced with the separator you specified.

    Change file extension

    To change the file extension for a bunch of files with PowerShell, use these steps:

    1. Open Start.
    2. Search for PowerShell and click the top result to open the app.

    Type the following command example to navigate to the folder with the files to rename and press Enter:

    In the command, replace PATH\TO\FOLDER with the actual path to the location.

    For example, this command navigates the «files» folder inside «Documents»:

    Source: Windows Central

    (Optional) Type the following command to view a listing of the files in the location and press Enter:

    Type the following command to change the extension on files and press Enter:

    ls | Rename-Item -NewName

    In the command, replace «.NEW-EXTENSION» with a new extension for the files.

    For example, this command changes any file extension to «.doc»:

    ls | Rename-Item -NewName

    Source: Windows Central

    Once you complete the steps, PowerShell will change the extension to the one you specified.

    Rename specific extension file names

    The above instructions will rename every file within the folder location. However, if you want to change the name of a particular file format, such as documents, pictures, or videos, you can use the «-filter» option.

    To change the names of a specific file format with PowerShell commands, use these steps:

    1. Open Start.
    2. Search for PowerShell and click the top result to open the app.

    Type the following command example to navigate to the folder with the files to rename and press Enter:

    In the command, replace PATH\TO\FOLDER with the actual path to the location.

    For example, this command navigates the «files» folder inside «Documents»:

    Source: Windows Central

    (Optional) Type the following command to view a listing of the files in the location and press Enter:

    Type the following command to rename files with a specific extension and press Enter:

    In the command, replace «NEW-FILE-NAME» and «EXTENSION» with the parameter you want to use.

    For example, this command renames only files that include the «.jpg» extension:

    Source: Windows Central

    Once you complete the steps, PowerShell will rename the files with a specific extension using the name you specified in the command.

    How to rename multiple files using Command Prompt

    On Windows 10, Command Prompt also offers multiple ways to change the name of one or multiple files in bulk.

    Rename single file

    To rename one file with Command Prompt on Windows 10, use these steps:

    1. Open Start.
    2. Search for Command Prompt and click the top result to open the app.

    Type the following command example to navigate to the folder with the files to rename and press Enter:

    For instance, this example opens the «files» folder inside «Documents»:

    Source: Windows Central

    Type the following command to view a listing of the files in the location and press Enter:

    Type the following command to rename the file and press Enter:

    ren «OLD-FILENAME.EXTENSION» «NEW-FILENAME.EXTENSION»

    In the command, replace «OLD-FILENAME.EXTENSION» and «NEW-FILENAME.EXTENSION» with the old and new file name you want. The quotation marks are only required if the name includes spaces.

    For instance, this commands renames the file to «summer_trip_21_notes.txt»:

    ren summer_trip_21_notes.txt summer_vacation_21_notes.txt

    Source: Windows Central

  • Repeat step No. 5 to change the name of the remaining files
  • Once you complete these steps, Command Prompt will rename the file with the new name you specified.

    Rename multiple files

    To rename multiple files in bulk with the same name structure with Command Prompt, use these steps:

    1. Open Start.
    2. Search for Command Prompt and click the top result to open the app.

    Type the following command example to navigate to the folder with the files to rename and press Enter:

    For instance, this example opens the «files» folder inside «Documents»:

    (Optional) Type the following command to view a listing of the files in the location and press Enter:

    Type the following command to rename the files in bulk and press Enter:

    ren *.FILE-EXTENSION . -FILE-NAME.*

    In the command, replace «FILE-EXTENSION» with the extension of the files you want to update and «FILE-NAME» with part of the name you want to add to all the files. The asterisk * is a wildcard that tells the ren command to rename everything with a specific extension. The question mark ? is also a wildcard, but it represents a character of the original name you want to keep as part of the new name.

    For instance, this command renames all «.jpg» files leaving the first three characters (which works as a unique identifier to avoid duplication) and appends «-hikingTrails» to the name:

    ren *.jpg . -hikingTrip.*

    Source: Windows Central

    Quick tip: When renaming files, the ren command sees a period (.) as the end of the filename. This means that if you have files with one or more periods as part of the name, the command may produce unexpected results.

    After you complete the steps, the files will be renamed using the settings you specified.

    Trim multiple file names

    To make file names shorter with Command Prompt, use these steps:

    1. Open Start.
    2. Search for Command Prompt and click the top result to open the app.

    Type the following command example to navigate to the folder with the files to rename and press Enter:

    This example opens the «files» folder inside «Documents»:

    Source: Windows Central

    (Optional) Type the following command to view a listing of the files in the location and press Enter:

    Type the following command to make file names shorter and press Enter:

    In the command, the asterisk * matches all the file names and extensions in the folder, and the question marks ? indicate how many characters to use for the new file name.

    For instance, this command trims the file names longer than five characters:

    Source: Windows Central

    If the file name has less than five characters, the name will not change. (If you want to make the file name longer, add extra question marks in the syntax.)

    Once you complete these steps, you will end up with shorter file names depending on the question marks (?) you specified in the command.

    Modify multiple file names

    To rename part of the name on similar files, use these steps:

    1. Open Start.
    2. Search for Command Prompt and click the top result to open the app.

    Type the following command example to navigate to the folder with the files to rename and press Enter:

    This example opens the «files» folder inside «Documents»:

    Source: Windows Central

    (Optional) Type the following command to view a listing of the files in the location and press Enter:

    Type the following command to rename the part of the file name and press Enter:

    ren OLD-FILE-NAME-PART*.* NEW-FILENAME-PART*.*

    In the command, replace «OLD-FILE-NAME-PART» and «NEW-FILENAME-PART» with the old and new parts of the filename. The asterisk * is a wildcard that will match the rest of the filename and file extension to append the new part of the name.

    For instance, this command renames files that start with «summer_trip_21» to «vacation_2021»:

    ren summer_trip_21*.* vacation_2021*.*

    Source: Windows Central

    After you complete the steps, the files with similar names will be modified with the new name structure you specified in the command.

    Change file extension

    To change the file extension to another compatible extension on Windows 10, use these steps:

    1. Open Start.
    2. Search for Command Prompt and click the top result to open the app.

    Type the following command example to navigate to the folder with the files you want to rename and press Enter:

    This example opens the «files» folder inside «Documents»:

    Source: Windows Central

    (Optional) Type the following command to view a listing of the files in the location and press Enter:

    Type the following command to change the file extension and press Enter:

    ren *.OLD-EXTENSION *.NEW-EXTENSION

    In the command, change «OLD-EXTENSION» and «NEW-EXTENSION» with the old and new file extension.

    For instance, this command changes the extension from «.txt» to «.doc» compatible with Microsoft Word for the files in the location:

    This example without wildcards ( * ) changes the only extension of a single file from «.txt» to «.doc»:

    ren vacation_2021_notes.txt vacation_2021_notes.doc

    Source: Windows Central

    Once you complete the steps, the file extension will be replaced with the new extension specified in the command.

    Rename files with specific extension

    The previous steps rename every file within the location. However, if you want to rename only a group of files with a specific format, you need to omit the asterisk * and specify the command’s target extension.

    To rename files with a specific file extension on Windows 10 with Command Prompt, use these steps:

    1. Open Start.
    2. Search for Command Prompt and click the top result to open the app.

    Type the following command example to navigate to the folder with the files to rename and press Enter:

    This example opens the «files» folder inside «Documents»:

    Source: Windows Central

    (Optional) Type the following command to view a listing of the files in the location and press Enter:

    Type the following command to change the file extension in the location and press Enter:

    ren OLD-FILE-NAME*.EXTENSION NEW-FILE-NAME*.EXTENSION

    In the command, change «OLD-FILE-NAME,» «NEW-FILE-NAME,» and «EXTENSION» with the old and new file name and extension you want to target.

    For instance, this command only renames images with a «.jpg» extension:

    ren picture-*.jpg vacation*.jpg

    Source: Windows Central

    After you complete the steps, Command Prompt will rename the files using the settings that you specified in the command.

    While these commands have been tested to work as expected, it is always recommended that you perform a test run before trying to rename the original files on your computer.

    More Windows 10 resources

    For more helpful articles, coverage, and answers to common questions about Windows 10, visit the following resources:

    The Dell XPS 15 is our choice for best 15-inch laptop

    For a lot of people, a 15-inch laptop is a perfect size that offers enough screen for multitasking, and in a lot of cases, some extra performance from powerful hardware. We’ve rounded up the best of the best at this size.

    Halo: MCC’s live service elements make it better, not worse

    Halo: The Master Chief Collection is more popular than ever, but some fans don’t agree with the live service approach 343 Industries has taken with it. Here’s why those elements are, at the end of the day, great for the game and for Halo overall.

    Microsoft’s Surface Duo is not ‘failing up’

    Microsoft announced this week that it was expanding Surface Duo availability to nine new commercial markets. While Surface Duo is undoubtedly a work in progress, this is not a sign of a disaster. It’s also doesn’t mean that Surface Duo is selling a ton either. Instead, the reason for the expansion is a lot more straightforward.

    These are the best PC sticks when you’re on the move

    Instant computer — just add a screen. That’s the general idea behind the ultra-portable PC, but it can be hard to know which one you want. Relax, we have you covered!

    Читайте также:  Linux для использования с флешки
    Оцените статью