I have a PowerShell script which allows me to rename a bunch of files within a folder.
How do I adjust the script to include the week number starting from a specific date?
For example, I don't want week 1 to being from January 1st. I want it to start on April 1st.
From:
- C001.mp4
- C002.mp4
- C003.mp4
To:
- SONYA7 - 2020-04-01 - 17-33-32 - WK1.mp4
- SONYA7 - 2020-04-09 - 13-48-20 - WK2.mp4
- SONYA7 - 2020-04-09 - 13-51-46 - WK2.mp4
Here is my current script:
Get-ChildItem *.mp4 | Rename-Item -newname {“SONYA7 - “ + $_.LastWriteTime.toString("yyyy-MM-dd - HH-mm-ss") + ".mp4"}