On 'Rule Begin' Pascal Script: Var tmpList: TStringList; Const ctCsvFile = 'C:\Test\In_Parse_Csv\AssetID_with_SerialNumber.csv'; Begin psVSA := ''; psExitCode:= 0; // ... add your code here tmpList := TStringList.Create; Try Try tmpList.LoadFromFile(ctCsvFile); psVSA := tmpList.CommaText; If Trim(psVSA) <> '' Then Begin psLogWriteStr('Successfully Loaded: ' + ctCsvFile); psExitCode := 1; End; Except psLogWriteStr('Exception Error Loading: ' + ctCsvFile); End; Finally tmpList.Free; End; End. Destination Pascal Script: Var iList: Integer; tmpEntry, tmpID: String; tmpPos: Integer; tmpEntryList, tmpList: TStringList; Const ctDefaultVAR1 = 'Default'; ctDefaultVAR2 = 'None'; ctDonationID = 'Donation ID'; Begin psVSB := ctDefaultVAR1; psVSC := ctDefaultVAR2; psExitCode:= 1; // ... add your code here IF Length(psFileName) < 11 Then Exit; // tmpID := Copy(psFileName, 7, 4); psLogWriteStr('ID: ' + tmpID); // Parse Csv tmpList := TStringList.Create; Try tmpList.CommaText := psVSA; For iList := 0 to (tmpList.Count - 1) Do Begin If pos(tmpID, tmpList.Strings[iList]) = 1 Then Begin tmpEntryList := TStringList.Create; Try tmpEntryList.StrictDelimiter := True; tmpEntryList.Delimiter := ';'; tmpEntryList.QuoteChar := #0; tmpEntryList.DelimitedText := tmpList.Strings[iList]; If tmpEntryList.Count >= 2 Then psVSB := tmpEntryList.Strings[1]; Break; Finally tmpEntryList.Free; End; End; End; Finally tmpList.Free; End; // Parse Source File tmpList := TStringList.Create; Try Try tmpList.LoadFromFile(psFilePath + psFileName); For iList := 0 To (tmpList.Count - 1) Do Begin tmpEntry := tmpList.Strings[iList]; tmpPos := Pos(UpperCase(ctDonationID), UpperCase(tmpEntry)); If tmpPos <> 0 Then Begin psVSC := Copy(tmpEntry, tmpPos, Length(tmpEntry) - tmpPos + 1); psVSC := psStringReplace(psVSC, ctDonationID, ''); psVSC := Trim(psVSC); psVSC := psStringReplace(psVSC, '\', ' '); psVSC := psStringReplace(psVSC, '/', ' '); psVSC := psGetValidFileName(psVSC); Break; End; End; Except psLogWriteStr('Exception loading Source file: ' + psFilePath + psFileName); End; Finally tmpList.Free; End; // Debug psLogWriteStr('psVSB: ' + psVSB + ' - psVSC: ' + psVSC); End.