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
| # Example Command: .\RenameByHash.ps1 -TargetDir "[Path]" -Extension "[FileSuffix]" | |
| # Define parameters that can be passed via command line | |
| param( | |
| [string]$TargetDir, | |
| [string]$Extension | |
| ) | |
| # If TargetDir wasn't provided as an argument, ask for it | |
| if ([string]::IsNullOrWhiteSpace($TargetDir)) { | |
| $TargetDir = Read-Host "Enter target folder path (Press Enter for current directory)" |