Directory on the device

Discussion in 'Questions (Windows Mobile)' started by BjornF, Dec 2, 2008.

  1. BjornF

    BjornF Active Member Licensed User

    Is there a way of checking if a given folder exists on the device from a program on the Pc (i.e. something corresponding to rapi.DeviceFileExist() - perhaps a "rapi.DeviceDirectoryExist()"?)?

    I have tried a workaround, files()=rapi.GetFiles("TheDirectory\*.*"). I had hoped that I would get an errormessage if TheDirectory does not exist, but all that happens is that the Arraylength of files() is 0 :(

    All the best / Björn
     
  2. agraham

    agraham Expert Licensed User

    :signOops: didn't read the question carefully enough! I've deleted the following rubbish :sign0013:
     
  3. Erel

    Erel Administrator Staff Member Licensed User

    If I remember correctly DeviceFileExist should also work with folders.
     
  4. BjornF

    BjornF Active Member Licensed User

    Indeed it does :) that solved the problem, thank you Erel.
    (Perhaps it might be a good idea to include it in the help file at the next release? i.e. "Checks whether a specific file or directory exists on the device.")

    all the best / Björn
     
  5. Erel

    Erel Administrator Staff Member Licensed User

    I agree and it will be added.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice