0

I have over 1000 files with the following format

WMS_002248557A931EDE81AEE9DEF8AB0CCD.xml.20230607T141028.383-1443092915
WMS_0022485689451EDE81AEFD441B115F0C.xml.20230607T141430.753-1443334398

I want to keep ONLY up to XML and stripped the rest

how can I do this in DOS Command prompt?

I have tried the following command

ren *.xml.* *.xml

and the result is close but not exactly how I want it

WMS_002248557A931EDE81AEE9DEF8AB0CCD.xml.20230607T141028.xml
WMS_0022485689451EDE81AEFD441B115F0C.xml.20230607T141430.xml

1 Answers1

1

I figured this out since the length of the filename prefix (WMS_) 4 chars and guid (32 chars) is constant

there is 36 question marks here.

ren *.* ??????????????????????????????????????.xml

and the output is exactly what I need. Thanks

WMS_002248557A931EDE81AEE9DEF8AB0CCD.xml
WMS_0022485689451EDE81AEFD441B115F0C.xml