I have a bunch a raw data that really only has four values I care about: DX, DY, Width and Height in addition to the corresponding offset name.
The text file with this raw data looks like this:
0:walk: Length=5 Offset=#b0 U1=#1058000 U2=#ff U3=#0 U4=#0
0: Offset=#218 Size=#6 U1=#0
0: Type=0 Offset=#ed8 Size=#3f8 Width=39 Height=54 HSType=#2 HS=#23030
HotSpot: X=2 Y=-34 DX=4 DY=-22 U1=0 U2=7 U3=0 U4=0
1: Type=0 Offset=#12d0 Size=#3e8 Width=39 Height=53 HSType=#2 HS=#23040
HotSpot: X=1 Y=-35 DX=1 DY=-24 U1=0 U2=7 U3=0 U4=0
2: Type=0 Offset=#16b8 Size=#3e5 Width=38 Height=53 HSType=#2 HS=#23050
HotSpot: X=0 Y=-35 DX=-1 DY=-24 U1=0 U2=7 U3=0 U4=0
3: Type=0 Offset=#1aa0 Size=#3fe Width=38 Height=54 HSType=#2 HS=#23060
HotSpot: X=0 Y=-34 DX=-3 DY=-22 U1=0 U2=7 U3=0 U4=0
...
And my csv type file needs to look like this:
00-walk-00-000,4,-22,39,54,4
00-walk-00-001,1,-24,39,53,4 ...
In other words: %a,%b,%c,%d,4 where %a is the name, %b is the DX value, %c is the DY value,%d is the Width,%e is the height.
I understand that making the %a is a little reach and maybe beyond the scope of what Im trying to do. I would be happy with just the %b,%c,%d values being extracted to separate line for each set. It is ugly data and difficult to see but the name, or %a, comes from three sources. The 00 comes from the first character the single 0. The next part of the %a is the text 'walk' right after 0, the final part comes from each subsequent frame number starting from 0. The random "offset=" blank is not the offset name, like I said I would just be happy to have the four variables %b-%e parsed into a csv file.
How can findstring be used to find wildcard values? For instance how to find the substring 'some number' in the string DX=some number when I dont know what that some number is? And whether or not this is possible with batch?