Hi All,
I am working on a PowerShell script to generate a dat file. I need to change the format of this file as follows:
Original File Name: eagle.dat
Required File Name: YYYYMMDD_CA_eagle.dat
I know that we can do this very easily from Windows Cmd like below. I have written this massive PowerShell script which I do not want to be wasted just because of this last step.
rename eagle.dat %date:~-4,4%%date:~-10,2%%date:~-7,2%_CA_eagle.dat
Thank you in advance for your reply.
Ben