I have a large number of files in a directory with this type of naming convention: "[Date] [Lastname] 345.pdf". Note: the 345 is constant for all of them
I would like to rename all of the files so that they read "[Lastname] [Date] 345.pdf".
Edit: I had a typo in there initially
I have had some success with:
gci -Filter *.pdf| %{Rename-Item $_.fullname $_.Name.Split(" ")[1]}
But that only gives me "[Date].pdf". Basically, I can't figure out how to use the above command to combine two different parts of the split. I basically want "[1] [0] [2].pdf" if that makes any sense.
Thanks.