Wilcards?

lordgrinzlordgrinz Member Posts: 8
Is there another way to use wildcards then in the following statement, because it doesnt work in C/AL code. While on this subject, is there a way to read what files are in a folder and then loop thru them using C/AL code?

IF EXIST ('C:\*.txt') THEN
ERASE ('C:\*.txt');

Comments

  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    Have a look at this thread: File searches in Navision

    You'll have to use the virtual table Files, and use REPEAT ... UNTIL structure to loop through the files within a directory. But you can set a filter, to filter out only the txt-files!
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • lordgrinzlordgrinz Member Posts: 8
    Thanks ...Luc Van Dyck! Thats what I was looking for :)
Sign In or Register to comment.