I have been tasked a little above my head with taking a repository of files and removing excess garbage characters from the filename and saving the renamed file in a different directory folder.
An example of the filenames are:
100-expresstoll.pdf 1000-2012-09-29.jpg 10000-2014-01-15_14.03.22.jpg 10001-2014-01-15_19.05.24.jpg 10002-2014-01-15_21.30.23.jpg 10003-2014-01-16_07.33.54.jpg 10004-2014-01-16_13.33.21.jpg 10005-Feb 4, 2014.jpeg 10006-O'Reilly_Media,_Inc..pdf
First group of numbers at the beginning are record IDs and are to be retained along with the file's extension. Everything else between the record IDs and the file extension needs to be dropped.
For example, the final name for first three files would be:
100.pdf 1000.jpg 10000.jpg
I have read Removing characters and Rearranging filenames in addition to other postings, but the complexity of having a variable character length at the front, a variable number of intermediary characters to be removed and variable file extension types have really tossed this beyond my limited PowerShell reach.