I would like to move a file to another folder to become two files with different file name with datetime, prefix and specific characters. Then remove the original file after completion.
For example, I have c:\source\aaa.pdf and want it to be duplicated to
c:\destination\12345_TPE_aaa_20180614151500.pdfc:\destination\12345_TXG_aaa_20180614151500.pdf- then delete
c:\source\aaa.pdf.
Now I was stuck at even only file name changing, I tried
Get-ChildItem *.pdf | rename-item -newname ('12345'+'_TPE'+$_.Name+'_'+(Get-Date -f yyyymmddhhmmss)+'.pdf')
but the original name will not be included.
Can any expert please help?