0

in c/al Navision, i would like to get a text file .txt (as a path) which is in a directory without knowing in which folder exacly the file is. The user enters for example D:\ and then the code should look after the text file in drive D, the text file might be in D:\output or in D:\output\XYZ we only know that the text file is in D:\ as the user has entered this path. I have figured out how to get the text file but only by specifiying the path of which the text file existed like D:\output\XYZ

Could anyone help? that would be high appreciated :D

rcFile.SETRANGE(Path,rcAutomatedtest_Path."Source path");
rcFile.SETFILTER(Name,'\*.txt');
IF rcFile.FINDSET THEN BEGIN
 REPEAT
 IF rcFile."Is a file" = TRUE THEN
  rcAutomatedtest_Path."Source path" := rcFile.Path;

 UNTIL (rcFile.NEXT = 0) 
END;
Aro
  • 3
  • 2

0 Answers0