bolProcessed := FALSE; CLEAR(lrecFile); lrecFile.RESET(); lrecFile.SETRANGE(Path,txtPathIn); lrecFile.SETRANGE(lrecFile."Is a file",TRUE); IF lrecFile.FIND('-') THEN REPEAT txtPONummer := ''; bolOKFile := TRUE; txtFileName := lrecFile.Name; logFile.CREATE(txtLogMap + 'Log_' + ShortFileName(txtFileName) + '_' + DELCHR(FORMAT(TODAY),'=','/\: ') + '_' + DELCHR(FORMAT(TIME),'=','/\: ') + '.txt'); logFile.CREATEOUTSTREAM(OutstreamObj); writeLog(txtFileName); writeLog('------------------------'); IF bolOKFile THEN ProcessFile(lrecFile); logFile.CLOSE; // UNTIL lrecFile.NEXT = 0; CLEAR(lrecFile);
Comments
Just a happy frood who knows where his towel is
|To-Increase|
lrecFile.SETRANGE(Path,ROOT);
lrecfile.findset;//if your root doesn't contain any files or folders it will error, but seriously if your root doesn't have any files/folders, something else is wrong
lrecFile.RESET();
lrecFile.SETRANGE(Path,txtPathIn);
lrecFile.SETRANGE(lrecFile."Is a file",TRUE);
Does this work?
|To-Increase|