Sorry this blog does not have FB Comment.
Please use Blogger Comment.

Tuesday, November 15, 2016

[How-to] Rename mutiple files by replace character with PowerShell

1. Open folder of files you want to rename.
2. To open PowerShell, go to "File" menu then select "Open Windows PowerShell" then click "Open Windows PowerShell" on the right.




3. In this how-to, we will replace underscore ("_") with hypen ("-"). Type or copy and past the follwing command:
dir | rename-item -NewName {$_.name -replace "_","-"}

4. This is the result.

5. If you want to replace the charactors with words or replace the words with words. You can do that by using the command like this:
dir | rename-item -NewName {$_.name -replace "Test-File-","Subject_"}

6. You'll get the result like this.

No comments:

Post a Comment

Your comment will be read by admin before it's published
ความเห็นของท่านจะถูกกลั่นกรองและเผยแพร่ภายหลัง

Popular Posts