@Echo Off
SetLocal EnableDelayedExpansion
:: Обрабатываемая папка
Set Folder=G:\Temp\1
:: папка назначения
Set Out=G:\Temp\2
For /R "%Folder%" %%i In (*.gz) Do (
       IF EXIST "%%i" (
	   Set name=%%~ni
           Set mask=!name:~30,30!
           MD "%Out%\!mask!"
           Move "%%~dpi?!mask!*%%~xi" "%Out%\!mask!\"
       )
)
Pause>Nul<measData>
    <manElement usLa="LTF_51_C" />
    <Info InfoId="726657">
      <granPeriod dur="0S" endTime="2021-02-13T" />
      <repPeriod dur="PT900S" />
      <Types>1526 748764 1548765 </Types>
</Info>
<Info InfoId="726657">
      <granPeriod dur="0S" endTime="2021-02-13T" />
      <repPeriod dur="PT900S" />
      <Types>1557 1526764 15265 </Types>
</Info>string[] lines = File.ReadAllLines("C:\\1.xml");
            IEnumerable<string> xmlLines = lines.Where(x => x.Contains("<Types>"));
            HashSet<string> xmlLinesHashSet = new HashSet<string>(xmlLines);
            string[] sorted = xmlLinesHashSet.ToArray();
            File.WriteAllLines("C:\\2.xml", sorted);<Types>1526 748764 1548765 </Types>
<Types>1557 1526764 15265 </Types>1526 748764 1548765 1557 1526764 15265        <measData>
    <manElement usLa="LTF_51_C" />
    <Info InfoId="726657">
      <granPeriod dur="0S" endTime="2021-02-13T" />
      <repPeriod dur="PT900S" />
      <Types>1526 748764 1548765 </Types>
</Info>
<Info InfoId="726657">
      <granPeriod dur="0S" endTime="2021-02-13T" />
      <repPeriod dur="PT900S" />
      <Types>1557 1526764 15265 </Types>
</Info>string[] lines = File.ReadAllLines("C:\\1.xml");
            IEnumerable<string> xmlLines = lines.Where(x => x.Contains("<Types>"));
            HashSet<string> xmlLinesHashSet = new HashSet<string>(xmlLines);
            string[] sorted = xmlLinesHashSet.ToArray();
            File.WriteAllLines("C:\\2.xml", sorted);<Types>1526 748764 1548765 </Types>
<Types>1557 1526764 15265 </Types><manElement usLa="LTF_51_C" /> и создавался вот так "C:\\LTF_51_C.xml"