Last active
December 17, 2015 23:39
-
-
Save moluapple/5690732 to your computer and use it in GitHub Desktop.
Powershell 命令收集
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dir *.png | rename-item -newname { $_.name -replace ".png",".pdg" } | |
Dir *.pdg | rename-item -newname { "000" + $_.name } | |
//Batch Incremented File Rename | |
$files = Get-ChildItem c:\yourpath\*.ext | |
$id = 1 | |
$files | foreach { | |
Rename-Item -Path $_.fullname -NewName (($id++).tostring() + $_.extension) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment