title: Powershell : Renaming folders with formatted date
body: <p>I have several folders which are named in the format &quot;YYYYMMDD - Folder Name&quot;. I would like to make a powershell script to rename all those folders into the format &quot;YYYY-MM-DD - Folder Name&quot;. I tried several scripts online to do this but couldnt get pass to split the text and format it correctly&quot;.</p>
  <p>despite the first 8 digits being a date or not i just need to have it formated in &quot;YYYY-MM-DD - Folder Name&quot;.  Eg: &quot;00000000 - Folder Name 3&quot; to &quot;0000-00-00 - Folder Name&quot;</p>
  <p>Thank you in advance for the script :)<a href="https://i.stack.imgur.com/4I40L.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4I40L.jpg" alt="enter image description here" /></a></p>