Last active
April 6, 2020 14:35
-
-
Save panlw/c58531ca7116b76cfc2e14321c92cd35 to your computer and use it in GitHub Desktop.
This file contains 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
// Rename files with a sequence number leading | |
ls |% { $i=0 }{ $i++; Rename-Item -NewName ('{0:2d}_{1}.png' -f $i,$_.basename) } | |
// List file name with size in MBs | |
ls |% { '{0,16} = {1} MB' -f $_.name, [math]::round($_.length/1mb) } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment