How can I Remove variable string in all filenames until first occurrence of the hyphen in PowerShell?
I have a list of files in the same folder like:
picture_1_2017-01-02_abc.jpg picture_10_2017-01-03_dfc.jpg picture_111_2017-01-04_sdfc.jpg picture_20_2017-01-05_gh.jpg picture_354_2017-01-06_asfd.jpg ...
I'd like to replace everything until first "hyphen" by "2017". For example, to replace "picture_10_2017" by "2017" and leave the rest of the name as is to receive the next list of files:
2017-01-02_abc.jpg
2017-01-03_dfc.jpg
2017-01-04_sdfc.jpg
2017-01-05_gh.jpg
2017-01-06_asfd.jpg
How can I do that in windows by PowerShell or any other tool?