Directory

Kc_NirvanaKc_Nirvana Member Posts: 146
Hello.
How to validate if a directory exists?
I want to put a error file in disk but i want to validate if directory that user entered exists
Anyone knows how?
Junior Consultant & Developer in Dynamics NAV

"I'm worse at what I do best
And for this gift I feel blessed
Our little group has always been
And always will until the end"

Nirvana - Nevermind - Smells Like Teen Spirit

Answers

  • BeliasBelias Member Posts: 2,998
    It's useless to check in my opinion: just look at codeunit 412 (i never remember the name). with that codeunit the user can use the default browsing dialog box of windows. you can search the name of the codeunit in mibuso for further info, or report 81: file name textbox on reqform.
    if the user selects a not existing folder, he will get an error...what should him expect?
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • Kc_NirvanaKc_Nirvana Member Posts: 146
    But i don't want that because it opens or it saves a file not check a directory
    I know.... Put it's to prevent calls like ' This s**t is not doing things right. You f**ed up this thing' and when i check its a directory that doesn't exits.....
    Junior Consultant & Developer in Dynamics NAV

    "I'm worse at what I do best
    And for this gift I feel blessed
    Our little group has always been
    And always will until the end"

    Nirvana - Nevermind - Smells Like Teen Spirit
  • kapamaroukapamarou Member Posts: 1,152
    You can use the File virtual table. Declare a record variable for File table.

    Create a form based on that table to see its fields and how it works when you apply filters.
  • BeliasBelias Member Posts: 2,998
    oh, i probably misunderstood your post...i thought that user was "inputting" the path...
    follow other people's suggestions to make it work
    This s**t is not doing things right. You f**ed up this thin
    quite fancy users you have :mrgreen:
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • Kc_NirvanaKc_Nirvana Member Posts: 146
    It worked. Thanks to all
    Junior Consultant & Developer in Dynamics NAV

    "I'm worse at what I do best
    And for this gift I feel blessed
    Our little group has always been
    And always will until the end"

    Nirvana - Nevermind - Smells Like Teen Spirit
Sign In or Register to comment.