I have a path in a string,
\"C:\\temp\\mybackup.zip\"
I would like insert a timestamp in that script, for example,
\"C:\\temp\\myb
Thanks for the above script. One little modification to add in the file ending correctly. Try this ...
$filenameFormat = "MyFileName" + " " + (Get-Date -Format "yyyy-MM-dd") **+ ".txt"** Rename-Item -Path "C:\temp\MyFileName.txt" -NewName $filenameFormat