Check if Directory Exists?

KromozoneKromozone Member Posts: 47
Hi Developer,

with EXISTS(File) I can check if a file exists. But how can I do this with Directories? I want to check if a specific Path exists.

Thank you!

Regards
Andy

Comments

  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    Check this topic: Check for, Create Directory
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • IHateLinuxIHateLinux Member Posts: 223
    Hi,

    you can also use this Navision built in function:
    EXISTS('XXX_YOURLOCALPATH_XXX\nul');
    Dont forget to put the \nul string behind your local path.

    This tip is from another forum, thanks to Mr. Anfinnur Hovgaard.

    HTH,

    Rainer
  • KromozoneKromozone Member Posts: 47
    Thank you IHateLinux & Luc Van Dyck

    I've testet with the Exists()-Function already, but i did not know how to use with Pathes insted of Files.

    Thank you! I would prefer this Function insted of the FileSystemObject :wink:

    Andy
  • ajhvdbajhvdb Member Posts: 672
    btw, Is it possible to create a folder ?
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    See this topic for the answer.
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • ajhvdbajhvdb Member Posts: 672
    Yes, just wanted confirmation it's not poss. in navision code.
Sign In or Register to comment.