Categories
Archive
![]() Blogroll
|
Renaming all file names in a directory with Powershell
Posted in Windows Powershell | No Comment | 1,927 views | 27/06/2010 21:46
If you use Flashget, sometimes it downloads files with .html extension. You have to trim .html extensions from files but if you download so many files, you need to use script to save your time. $files = dir foreach ($file in $files) { $new=$file.name.replace(".html","") ren $file $new } Simply, I use basic dos command, ren to rename files. But you can use Rename-Item to make it 100% Powershell :)
Tags: changing file name powershell, rename file powershell, rename-item powershell, replacing file names powershell
Leave a Reply
|