Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Getting a number from within a string

$
0
0

I have a folder with several hundred picture files of our employees that are named in the format first name last name employeeid.jpg. For example, we would have files like john smith 213333.jpg and jane smith 342345.jpg. I need to extract only the numbers from these files and then save a copy of the file using the number as the name with the same file extension. It seems like select-string would do this, but I can't seem to get the syntax correct. Any help is greatly appreciated.


Dennis Ervin


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>