I have an application that outputs XML files during the life of an event in the software. I need to parse the XML files and once certain text are matched, move the file to another folder
The file name format of each XML file is: Event Owner (MEMS), Year (2020) and serial number (00012345). The software will write same file multiple time throughout the event so I need to look for specific items before taking any action. I would prefer to do this in PowerShell if at all possible.
I need to find
`<EventUnits>
<Unit>
<UnitCode>xxxxxxx></UnitCode>
</EventUnits>`
and
<EventDetails>
<EventCompletedTime>YYYY-MM-DD HH:MM:SS</EventCompletedTime>
</EventDetails>
Once UnitCode equals one of 4 unit codes and EventCompleted has a valid date and time, the file is moved to a different folder.