Created
December 18, 2019 12:30
-
-
Save oliveratgithub/c7ca04ce9cea5d3c2319d9c2083c7f49 to your computer and use it in GitHub Desktop.
Batch file rename using PowerShell on Windows: add filename prefix, change file name to all lowercase, and so on.
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
<# Batch change all PDF file names to lowercase letters within a specific directory #> | |
dir C:\PATH\TO\FOLDER\*.pdf | Rename-Item -NewName {$_.Name.ToLower()} |
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
<# Batch add prefix to all JPG-images in a specific directory #> | |
dir C:\PATH\TO\FOLDER\*.jpg | Rename-Item -NewName {"prefix_" + $_.Name} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment