diff --git a/Adaptation/FileHandlers/MoveMatchingFiles/FileRead.cs b/Adaptation/FileHandlers/MoveMatchingFiles/FileRead.cs index 2796326..2e419d3 100644 --- a/Adaptation/FileHandlers/MoveMatchingFiles/FileRead.cs +++ b/Adaptation/FileHandlers/MoveMatchingFiles/FileRead.cs @@ -268,7 +268,7 @@ public class FileRead : Shared.FileRead, IFileRead } } - private static ReadOnlyCollection
 GetPreCollection(int numberLength, string parentDirectory, ReadOnlyCollection matchingFiles, bool _)
+    private static ReadOnlyCollection
 GetPreCollection(int numberLength, string parentDirectory, ReadOnlyCollection matchingFiles)
     {
         List
 results = new();
         Pre pre;
@@ -366,10 +366,7 @@ public class FileRead : Shared.FileRead, IFileRead
             { CreatePointerFile(numberLength, parentParentDirectory, matchingFiles); }
             catch (Exception) { }
         }
-        JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(processDataStandardFormat);
-        List descriptions = pcl.ProcessData.GetDescriptions(jsonElements);
-        bool mesEntityMatchesProcess = descriptions.Count > 0 && descriptions[0].MesEntity == descriptions[0].Reactor;
-        ReadOnlyCollection
 preCollection = GetPreCollection(numberLength, parentParentDirectory, matchingFiles, mesEntityMatchesProcess);
+        ReadOnlyCollection
 preCollection = GetPreCollection(numberLength, parentParentDirectory, matchingFiles);
         ReadOnlyCollection preWithCollection = GetPreWithCollection(preCollection);
         MoveCollection(dateTime, processDataStandardFormat, preWithCollection);
         return results;
diff --git a/Adaptation/FileHandlers/pcl/Run.cs b/Adaptation/FileHandlers/pcl/Run.cs
index 2ffad01..516c329 100644
--- a/Adaptation/FileHandlers/pcl/Run.cs
+++ b/Adaptation/FileHandlers/pcl/Run.cs
@@ -108,7 +108,7 @@ internal class Run
         else
         {
             ReadOnlyCollection waferIds = GetWaferIds(header);
-            ReadOnlyDictionary keyValuePairs = Wafer.Get(pages, constant, headerFileName);
+            ReadOnlyDictionary keyValuePairs = Wafer.Get(pages, constant, headerFileName, header);
             ReadOnlyCollection wafers = Wafer.Get(waferIds, keyValuePairs);
             result = new(header, wafers);
             WriteJson(logistics, fileInfoCollection, result);
diff --git a/Adaptation/FileHandlers/pcl/Wafer.cs b/Adaptation/FileHandlers/pcl/Wafer.cs
index a0d3d04..e2ec94b 100644
--- a/Adaptation/FileHandlers/pcl/Wafer.cs
+++ b/Adaptation/FileHandlers/pcl/Wafer.cs
@@ -113,7 +113,7 @@ public class Wafer
     public string Thruput { get; }
     public string Recipe { get; }
 
-    internal static ReadOnlyDictionary Get(ReadOnlyDictionary pages, Constant constant, string headerFileName)
+    internal static ReadOnlyDictionary Get(ReadOnlyDictionary pages, Constant constant, string headerFileName, Header header)
     {
         Dictionary results = new();
         Wafer wafer;
@@ -190,6 +190,8 @@ public class Wafer
             string thruput = Header.GetToEOL(text, i);
             Header.ScanPast(text, i, "Recipe ID:");
             string recipe = Header.GetToEOL(text, i);
+            if (recipe != header.Recipe)
+                continue;
             wafer = new(date: date,
                         id: id,
                         comments: comments,
diff --git a/Adaptation/Shared/ProcessDataStandardFormat.cs b/Adaptation/Shared/ProcessDataStandardFormat.cs
index 113ba5f..a86241d 100644
--- a/Adaptation/Shared/ProcessDataStandardFormat.cs
+++ b/Adaptation/Shared/ProcessDataStandardFormat.cs
@@ -462,6 +462,7 @@ internal class ProcessDataStandardFormat
             results.Add(string.Empty);
             List hyphens = new();
             results.AddRange(processDataStandardFormat.InputPDSF.Header.Select(l => l.Replace('\t', '|')));
+            results.Add(string.Empty);
             results.Add($"|{string.Join("|", processDataStandardFormat.InputPDSF.Columns)}|");
             for (int i = 0; i < processDataStandardFormat.InputPDSF.Columns.Count; i++)
                 hyphens.Add('-');