Desired functionality
file1.txt -> file1.txt.deploy
file2.txt -> file2.txt.deploy
Attempt #82
Get-ChildItem | ForEach-Object {
Rename-Item -NewName { $_.Name + ".deploy" }
}
Cannot evaluate parameter NewName because its argument is specified as a script block and there is no input
What am I doing wrong?
{}with()in-newnameparameter value.Rename-Itemand skipForeach-Objectentirely. It's not necessary in this case.{}over()? I know the first is a script block, but why is it not appropriate in this case?