Appending Text to Filenames

The key to organizing your files is to set correct filenames. Our regular activities such as collaborating files with others, transferring files to another device, downloading new files result in improperly set filenames. 

Append Text to Filenames and Rename Files in Bulk Using Easy File Renamer. Apply 10+ Renaming Rules. Also Rename files on Cloud. Download NOW!

If you’ve got hundreds of thousands of files, it’s not an easy job to manually rename them.

Append Text to the Beginning of the Filenames

The first method is to insert text at the beginning of the filenames. The following example renames all file types. If you want to rename specific files, use the appropriate filters. For example, to rename only Portable Document Format (PDF) files, replace *.* with *.pdf

Open Notepad.

Type the following commands:

@echo off

for %%f in (*.*) do (

ren “%%~nf%%~xf” “%%~nf_mod%%~xf”

)

@echo on

echo “Files renamed: “

for %%f in (*.*) do (

echo “%%~nf%%~xf”

)

echo “Renaming has been successfully finished”

Append Text to the End of the Filenames

If you want to add text to the end of the filenames, simply use the PowerShell command given below. Don’t forget to replace the path in the example with the actual path to your folder. Replace *.* with *.docx to rename only Word Documents (.docx) files.

Syntax

gci <Folder Path> | % { rename-item –path $_.Fullname –Newname ( $_.basename + (get-date -format ‘ – DWS’) + $_.extension)

Example

gci C:\Users\John\Documents\TestFolder\*.* | % { rename-item –path $_.Fullname –Newname ( $_.basename + (get-date -format ‘ – DWS’) + $_.extension)

To open PowerShell, perform the following steps.

  1. Press Windows Key + X.
  2. Select Windows PowerShell (Admin).
  3. Type the command given above and press Enter to execute it.

Append Text to Filenames at a Specific Position

If you need to insert text into filenames at a specific position, execute the following command via Windows PowerShell. Replace 5 with the actual character position where you want to insert the text.

Syntax

Get-Item -Path $Path | Rename-Item -NewName {$_.BaseName.insert(<Character Position>,’_’) + $_.Extension} -WhatIf

Example

Get-Item -Path $Path | Rename-Item -NewName {$_.BaseName.insert(5,’_’) + $_.Extension} -WhatIf

Using Easy File Renamer

Easy File Renamer is a batch file renaming solution from Sorcim Technologies. It enables you to automatically rename hundreds of files with a pattern of your choice. You can choose one or more patterns, depending on your needs.

  • Rename documents, music, videos, images and other file formats.
  • A complementary subscription for cloud based file renaming. You don’t need to download your data to your computer to rename your files.
  • Dozens of file renaming patterns to choose from. You can add, remove, replace, trim text, etc.
  • Organize your files by their date.
  • Optional tools to load MP3 music files to edit the audio file tags and quickly migrate data without errors.

Steps

  1. Download Easy File Renamer.
  2. Click on the System Renamer tab.
  3. Click on Files and then Add Files.
  4. Browse and select the files you want to rename. You can select multiple files at once by selecting your files one by one while holding the Shift key of your keyboard.
  5. Your files will load into the Easy File Renamer application.
  6. Check the files you want to rename.
  7. Select the Insert At rule using the drop-down box on the left.
  8. In the Insert text field, type the custom text you want to insert into your filenames. For example, Illustrations.
  9. In the Position field, type a numerical position where you want to insert your text. For example, 5.
  10. Similarly, you can add multiple rules, if you want.
  11. Click the Add Rule button to add the rule to the renaming queue.
  12. Start the actual file rename process by clicking the green Rename button.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top