Skip to main content

Posts

Featured

A simple powershell script to bulk rename files in a folder in Windows 7

In this post I'm showing you how to buld rename a set of files in a folder. I'm using a powershell script to do this. Save the following script in a file with '.ps1' extension.

$files=dir *.wmv $i=0 foreach($file in $files){ $i++ write-host $file.Name rename-item -path $file -newname (""+$i+".wmv") }
"Dir" is for taking the file list in the directory with *.wmv extensions ( you have to change this according to your needs).
Then run the script using the following command.
powershell -executionpolicy bypass .\rename.ps1
ExecutionPolicy part is necessary so the Powershell wouldn't request us for signatures.

Latest Posts

How to change the color scheme/theme in Visual Studio 2010

How to set proxy settings in VLC [http and SOCKS]

How to change author in netbeans