Table of Content
HAL Forum
function string FileNameFromFolder (
string PathToFolder,string FileExtension)
Description:
Will return the FIRST found file name from the specified folder
Parameters:
PathToFolder The path tho the folder from where we will retrieve the file name
FileExtension The extension mask of the file that we are looking for
global
procedure SonicQIn()
begin
  xml xdata;
  Boolean testf;
  string 255 xstr,tstr;
  string 255 filename,fromfolder,tofolder;
  Integer err;
  
  fromfolder = "tmp\\seb-ee\\incoming\\";
  tofolder = "tmp\\seb-ee\\imported\\";

  filename = FileNameFromFolder(fromfolder,".txt");
  err = MoveFile(filename,fromfolder,tofolder);
  filename = FileNameFromFolder(fromfolder,".txt");

  err = MoveFile(filename,fromfolder,tofolder);
  
  xdata = ParseXMLFile(GetImportFileName);

  xstr = "Response/Process";
  tstr = XmlGetAttribute(xdata,xstr,"filename");

  xstr = "Response/Process/";
  tstr = XmlGet(xdata,xstr & "Code");
  tstr = XmlGet(xdata,xstr & "Description");

  while (TestEOF==false) begin
    xstr = ImportField;
    testf = NextImportLine(true);     
  end;        
  return;
end;
Related topics:
««