Windows Explorer to JSON ? Help

I am trying to automate an upload script from Windows to a web storage using a tool from the vendor. They have a code structure as seen below that will automatically name data with some of the static info.

{
“Operation”: “MyFirstAutoTransfer”
,“Path”: “C:\TEST”
,“PictureID”: “FileName”
,“Categories”: [{“CategoryName”: “Pending Review”}, {“CategoryName”: “Migration”}]
,“Entry”: “FileName”
,“CreateEntryIfNew”: true
}

I am trying to automatically read the first 9 characters of each file name and pass them into the ID and Entry fields. When using the code as is- it will take the data as static data, however if I have 123456789House.jpg and 523456788Car.jpg and 222222222Dog.jpg for instance- I would like it to parse the digits area before each file upload where those digits would fill the FileName area.

When attempting to use “old school” commands like @echo, setlocal, set- etc, it tells me error due to mixing the languages. Any assistance on the proper command to read and parse the filename as they change between files would be appreciated.

Thank you!