Via power-shell script, trying to add $Album variable to naming sequence.
Tried write host, variable is working. Have tried things like () [] {} "" '' . ect.
The goal is to get $Album
to work in this line below: {0:D2}$Album.mxf
$i = 1
$Artist = " Name"
$Type = "Type"
$Location = "Loc"
$Month = "Month"
$Year = "2019"
$Album = "$Artist $Type $Location $Month $Year"
# Write-Host -ForegroundColor Green -Object $Album;
Get-ChildItem *.mxf | %{Rename-Item $_ -NewName ('{0:D2}$Album.mxf' -f $i++)}
Before:
- Misc name - 1.mxf
- Misc name - 4.mxf
- Misc name - 6.mxf
Current:
- 01$Album.mxf
- 02$Album.mxf
- 03$Album.mxf
Goal:
- 01 Name Type Loc Month 2019.mxf
- 02 Name Type Loc Month 2019.mxf
- 03 Name Type Loc Month 2019.mxf