Var iList: Integer; tmpEntry, tmpInfo, tmpCsvFile, tmpOutputFile: String; tmpList: TStringList; Const ctOutputPath = 'C:\Test\Out_Csv\'; // Must end with a \ Begin // Init Var psExitCode:= 0; tmpCsvFile := psFilePath + psFileName; tmpOutputFile := ctOutputPath + psFileName; // Create Var tmpList := TStringList.Create; Try Try psLogWrite(1, '', 'Reading Csv Content from: ' + tmpCsvFile); tmpList.LoadFromFile(tmpCsvFile); // Check Csv Data available If tmpList.Count > 0 Then Begin // Remove Header = Index 0 of StringList Object tmpEntry := tmpList.Strings[0]; tmpList.Delete(0); psLogWrite(1, '', 'Removed from Csv Content: ' + tmpEntry); // Save adjusted Csv File Try psLogWrite(1, '', 'Save adjusted Csv Content to: ' + tmpOutputFile); // tmpList.SaveToFile(tmpOutputFile); tmpInfo := psSaveListToFile(tmpList, tmpOutputFile, True); // Check Info If tmpInfo = '' Then Begin // Set ExitCode as Successful psExitCode := 1; End Else psLogWrite(1, '', 'SaveToFile Error: ' + tmpInfo); Except psLogWrite(1, '', 'SaveToFile Error'); End; End Else psLogWrite(1, '', 'Error, no data available in Csv file: ' + tmpCsvFile); Except psLogWrite(1, '', 'LoadFromFile Error'); End; Finally // Free Var tmpList.Free; End; End.