'How to replace first number in multiple files to match files name

I have a set of files numbered 1-100 with the metadata containing the following (example):

File name: 10.dat

{"name":"Personnel 42589" ,"configuration":...}

I want to replace the digits in the file to match the file name so the outcome should be:

File name: 10.dat

{"name":"Personnel 10" ,"configuration":...}

I am trying to do the same operation for all 100 files, my first guess was using Notepad++ but it doesn't seem doable.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source