How to batch rename files with Windows PowerShell command script
How to batch rename files with Windows PowerShell command script. This How-To guide will help you rename in bulk the files in Windows Operating System using scripting via Windows PowerShell. The script is specially useful when renaming files like multiple MP3s, JPGs,

PNGs, or TXTs in a folder. Windows PowerShell is a shell created for Microsoft Windows mainly used by IT Administrators for automating tasks and system management. Based on the .Net framework, PowerShell is a more powerful command-line tool with associated scripting language compared to the classic Command Prompt.How to batch rename files with Windows PowerShell command script

 

How to batch rename files with Windows PowerShell command script

➤ How to batch rename files with Windows PowerShell command script details
    • To invoke Windows PowerShell in Windows, you can type

‘powershell’

    • in the search box. Using the Run dialog

(Windows + R)

    , you can also type-in the same ‘powershell’ command. For ease of use in Windows 7, you can open it by clicking Accessories in the Start Menu, then hit PowerShell. For Windows 8.1 or 10, look for the Windows PowerShell folder then hit the PowerShell executable.
Note: You can also rename your files in bulk using the old-reliable MS-DOS command-line. To rename files in Windows using CMD, you can either use ‘ren’ or ‘rename’ then use * and ? for wildcards and file matching. However, this article focuses mainly on Windows PowerShell and it’s ability to perform complex tasks such as batch file renaming.
First off, change your directory to where the files are located by using the ‘Set-Location -Path’ command:
Set-Location -Path C:\
You can change the path to your desired folder for example:
Set-Location -Path C:\Users\your_username\Desktop
Although changing to another drive is a much faster route. Just type in the desired drive letter. Let’s say from drive ‘D:\’ you change it to ‘C:\’
C:\

How to batch rename files with Windows PowerShell command script

How to batch rename files with Windows PowerShell command script
 
Tip: Make sure to enclose the path in quotes if they contain spaces.
After setting your desired folder where the files are residing, complete the batch file renaming process by using the script below:

$filter = ‘*.png’

get-childitem -path $path -filter $filter | rename-item -newname {$_.name -replace ‘old_name’,’new_name’}

This is assuming that ‘.png’ is your file type. You can modify this to your desired file type such as ‘.mp3’, ‘.jpg’ or ‘.bmp’. Finally, change the ‘old_name’ and ‘new_name’ as intended. In our example, we used ‘terablitz_old_name_’ and changed it to ‘terablitz_new_name_’.

How to batch rename files with Windows PowerShell command script

How to batch rename files with Windows PowerShell command script
 
Let me know how if this worked out for you. Please do not forget to post your comments below.
posted May 13, 2018 by THE11thROCK for TeraBlitz.com
FAIR USE DISCLAIMER: The following data is for educational, scholarship review and archiving purposes only. By viewing this information, you release the website and its authors from any responsibility or liabilities. Though we verify and maintain the accuracy of the provided data, the absence of unintented typographical and factual errors cannot be guaranteed. Use the page at your own risk. For any suggestions, updates, credits or correction requests, Contact Us: terablitz.rock@gmail.com
clsidThis is the CLSID List and Windows Special Folders Cheat Sheet. Most of the Special Folders within the Operating System are known by unique strings also known as CLSIDs or Class Identifiers. Some can be used with FileSelectFile, FileSelectFolder, and Run. If and when a Windows Shell needs an access to a system folder, it uses the CLSID to search through the Registry to search for the appropriate .dll or other object.
Your RUN command may support various CLSIDs depending on system config and installation. To open a CLSID folder via Run, simply specify the CLSID as your first parameter. To maximize use of all listed CLSIDs, you can either use RUN to execute the example string, or create a new folder and name it with the specified CLSID, or just paste it in your Windows Explorer and run it from the address bar.clsid
For example, to open the Recycle Bin folder:
Open Run and copy-paste the following and hit OK.
::{645ff040-5081-101b-9f08-00aa002f954e}
Create a new folder, and name it as
Recycle Bin.{645ff040-5081-101b-9f08-00aa002f954e}
Copy Paste the following in the Explorer address bar
shell:::{645ff040-5081-101b-9f08-00aa002f954e}
3. Other samples for execution with Run
Run ::{450d8fba-ad25-11d0-98a8-0800361b1103} ; Opens the “My Documents” folder.
Run ::{208d2c60-3aea-1069-a2d7-08002b30309d} ; Opens the “My Network Places”
Run ::{450d8fba-ad25-11d0-98a8-0800361b1103}\Custom Folder ; Opens a folder that exists inside “My Documents”.
Common CLSID Strings and Special Folders
CLSID String
Function or Location
Execute in RUN
::{d20ea4e1-3957-11d2-a40b-0c5020524153}
Administrative Tools
::{1D2680C9-0E2A-469d-B787-065558BC7D43}
All NET Frameworks and COM Libraries
::{1FA9085F-25A2-489B-85D4-86326EEDCD87}
All Networks For Current Connection
::{ED7BA470-8E54-465E-825C-99712043E01C}
All Tasks
::{0142e4d0-fb7a-11dc-ba4a-000ffe7ab428}
Biometric Settings
::{85bbd92o-42a0-1o69-a2e4-08002b30309d}
Briefcase
::{241D7C96-F8BF-4F85-B01F-E2B043341A4B}
Connections
::{21ec2o2o-3aea-1o69-a2dd-08002b30309d}
Control Panel
::{1206F5F1-0569-412C-8FEC-3204630DFB70}
Credentials and Logins
::{17cd9488-1228-4b2f-88ce-4298e93e0966}
Default Programs
::{4026492F-2F69-46B8-B9BF-5654FC07E423}
Firewall and Security
::{d20ea4e1-3957-11d2-a40b-0c5020524152}
Fonts
::{ED7BA470-8E54-465E-825C-99712043E01C}
God Mode
::{ff393560-c2a7-11cf-bff4-444553540000}
History
::{05d7b0f4-2121-4eff-bf6b-ed3f69b894d9}
Icons And Notifications
::{00020d75-0000-0000-c000-000000000046}
Inbox
::{00C6D95F-329C-409a-81D7-C46C66EA7F33}
Location Settings
::{00028b00-0000-0000-c000-000000000046}
Microsoft Network
::{20d04fe0-3aea-1069-a2d8-08002b30309d}
My Computer
Yes
::{450d8fba-ad25-11d0-98a8-0800361b1103}
My Documents
Yes
::{208d2c60-3aea-1069-a2d7-08002b30309d}
My Network Places
Yes
::{1f4de370-d627-11d1-ba4f-00a0c91eedba}
Network Computers
Yes
::{7007acc7-3202-11d1-aad2-00805fc1270e}
Network Connections
Yes
::{78F3955E-3B90-4184-BD14-5397C15F1EFC}
Performance
::{025A5937-A6BE-4686-A844-36FE4BEC8B6D}
Power Settings
::{2227a280-3aea-1069-a2de-08002b30309d}
Printers and Faxes
Yes
::{7be9d83c-a729-4d97-b5a7-1b7313c39e0a}
Programs Folder
::{15eae92e-f17a-4431-9f28-805e482dafd4}
Programs and Features
::{645ff040-5081-101b-9f08-00aa002f954e}
Recycle Bin
Yes
::{e211b736-43fd-11d1-9efb-0000f8757fcd}
Scanners and Cameras
::{d6277990-4c6a-11cf-8d87-00aa0060f5bf}
Scheduled Tasks
Yes
::{48e7caab-b918-4e58-a94d-505519c795dc}
Start Menu Folder
::{7bd29e00-76c1-11cf-9dd0-00a0c9034933}
Temporary Internet Files
::{bdeadf00-c265-11d0-bced-00a0c90ab50f}
Web Folders
::{78F3955E-3B90-4184-BD14-5397C15F1EFC}
WEI
Control Panel Items CLSID and Canonical Names
CLSID String
Function or Location
Execute in RUN
{BB64F8A7-BEE7-4E1A-AB8D-7D8273F7FDB6}
Action Center
{D20EA4E1-3957-11d2-A40B-0C5020524153}
Administrative Tools
{9C60DE1E-E5FC-40f4-A487-460851A8D915}
AutoPlay
{0142e4d0-fb7a-11dc-ba4a-000ffe7ab428}
Biometric Devices
{D9EF8727-CAC2-4e60-809E-86F80A666C91}
BitLocker Drive Encryption
{B2C761C6-29BC-4f19-9251-E6195265BAF1}
Color Management
{1206F5F1-0569-412C-8FEC-3204630DFB70}
Credential Manager
{E2E7934B-DCE5-43C4-9576-7FE4F75E7480}
Date and Time
{17cd9488-1228-4b2f-88ce-4298e93e0966}
Default Programs
{74246bfc-4c96-11d0-abef-0020af6b0b7a}
Device Manager
{A8A91A66-3A7D-4424-8D24-04E180695C7A}
Devices and Printers
{C555438B-3C23-4769-A71F-B6D3D9B6053A}
Display
{D555645E-D4F8-4c29-A827-D93C859C4F2A}
Ease of Access Center
{96AE8D84-A250-4520-95A5-A47A7E3C548B}
Family Safety
{F6B6E965-E9B2-444B-9286-10C9152EDBC5}
File History
{6DFD7C5C-2451-11d3-A299-00C04F8EF6AF}
Folder Options
{93412589-74D4-4E4E-AD0E-E0CB621440FD}
Fonts
{67CA7650-96E6-4FDD-BB43-A8E774F73A57}
HomeGroup
{87D66A43-7B11-4A28-9811-C86EE395ACF7}
Indexing Options
{A0275511-0E86-4ECA-97C2-ECD8F1221D08}
Infrared
{A3DD4F92-658A-410F-84FD-6FBBBEF2FFFE}
Internet Options
{A304259D-52B8-4526-8B1A-A1D6CECC8243}
iSCSI Initiator
{0D2A3442-5181-4E3A-9BD4-83BD10AF3D76}
iSNS Server
{725BE8F7-668E-4C7B-8F90-46BDB0936430}
Keyboard
{BF782CC9-5A52-4A17-806C-2A894FFEEAC5}
Language
{E9950154-C418-419e-A90A-20C5287AE24B}
Location Settings
{6C8EEC18-8D75-41B2-A177-8831D59D2D50}
Mouse
{AB3BE6AA-7561-4838-AB77-ACF8427DF426}
MPIOConfiguration
{8E908FC9-BECC-40f6-915B-F4CA0E70D03D}
Network and Sharing Center
{05d7b0f4-2121-4eff-bf6b-ed3f69b894d9}
Notification Area Icons
{F82DF8F7-8B9F-442E-A48C-818EA735FF9B}
Pen and Touch
{ED834ED6-4B5A-4bfe-8F11-A626DCB6A921}
Personalization
{40419485-C444-4567-851A-2DD7BFA1684D}
Phone and Modem
{025A5937-A6BE-4686-A844-36FE4BEC8B6D}
Power Options
{7b81be6a-ce2b-4676-a29e-eb907a5126c5}
Programs and Features
{9FE63AFD-59CF-4419-9775-ABCC3849F861}
Recovery
{62D8ED13-C9D0-4CE8-A914-47DD628FB1B0}
Region
{241D7C96-F8BF-4F85-B01F-E2B043341A4B}
RemoteApp and Desktop Connections
{F2DDFC82-8F12-4CDD-B7DC-D4FE1425AA4D}
Sound
{58E3C745-D971-4081-9034-86E34B30836A}
Speech Recognition
{F942C606-0914-47AB-BE56-1321B8035096}
Storage Spaces
{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}
Sync Center
{BB06C0E4-D293-4f75-8A90-CB05B6477EEE}
System
{80F3F1D5-FECA-45F3-BC32-752C152E456E}
Tablet PC Settings
{0DF44EAA-FF21-4412-828E-260A8728E7F1}
Taskbar and Navigation
{C58C4893-3BE0-4B45-ABB5-A63E4B8C8651}
Troubleshooting
{BAA884F4-3432-48b8-AA72-9BF20EEF31D5}
TSAppInstall
{60632754-c523-4b62-b45c-4172da012619}
User Accounts
{BE122A0E-4503-11DA-8BDE-F66BAD1E3F3A}
Windows Anytime Upgrade
{D8559EB9-20C0-410E-BEDA-7ED416AECC2A}
Windows Defender
{4026492F-2F69-46B8-B9BF-5654FC07E423}
Windows Firewall
{5ea4f148-308c-46d7-98a9-49041b1dd468}
Windows Mobility Center
{8E0C279D-0BD1-43C3-9EBD-31C3DC5B8A77}
Windows To Go
{36eef7db-88ad-4e81-ad49-0e313f0c35f8}
Windows Update
{ECDB0924-4208-451E-8EE0-373C0956DE16}
Work Folders
posted February 25, 2016 by THE11thROCK for TeraBlitz.com
FAIR USE DISCLAIMER: The following data is for educational, scholarship review and archiving purposes only. By viewing this information, you release the website and its authors from any responsibility or liabilities. Though we verify and maintain the accuracy of the provided data, the absence of unintented typographical and factual errors cannot be guaranteed. Use the page at your own risk. For any suggestions, updates, credits or correction requests, Contact Us: terablitz.rock@gmail.com

How To Hide Folders or Icons in Windows Explorer

This nifty tweak guides you on How To Hide Folders or Icons in Windows Explorer. This customization teaches you on how to remove the text in a folder or icon, and consequently how to replace that icon with an invisible graphic. The resulting action gives the impression that the icon is hidden when in fact it is still intact and clickable. (more…)

How To create Shortcut Icons with No Text label in Windows

how-to-hide-icon-labelsThis is your guide on How To create Shortcut Icons with No Text label in Windows Explorer. The tweak essentially works only for shortcut icons and removes the name or text label from the shortcut icon thereby making it appear as just an icon without any label. It also effectively removes the tooltip text, but will show a tip on which directory the icon resides. (more…)