eagle3344
asked on
Copy file based upon changing file name
Hello experts,
i am in need of a script that can copy a file on a daily basis from one directory to another based upon a changing filename. The filename's base stays the same, however the current date is appended to the end of the file.
For Example:
StaticFileName<Today's date in MM-DD-YYYY format>
or
StaticFileName12-17-2018 <-----This is the filename that needs to be copied on 12-17-2018
I am not a scripting expert so suggestion on best method (powershell, batch etc) is also appreciated.
Thanks in advance.
i am in need of a script that can copy a file on a daily basis from one directory to another based upon a changing filename. The filename's base stays the same, however the current date is appended to the end of the file.
For Example:
StaticFileName<Today's date in MM-DD-YYYY format>
or
StaticFileName12-17-2018 <-----This is the filename that needs to be copied on 12-17-2018
I am not a scripting expert so suggestion on best method (powershell, batch etc) is also appreciated.
Thanks in advance.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you to both. i appreciate you showing me how to accomplish that in a couple of different ways.
Open in new window
»bp