Announcement

Collapse
No announcement yet.

Read or write in a specific folder on SDcard

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Read or write in a specific folder on SDcard

    Hi everyone,

    For my project, I'm using FAT16 File functions.

    In my SDcard, I would organize a folder with only my own files.
    Is it possible to access to a specific folder to R/W on a file with FAT16 functions ?

    Regards

  • #2
    OK, I found the answer on the forum : it's not possible.

    Anyway, an other question, how to modify several bytes in the middle of a file ?

    Can we delete bytes in the middle of a file ?

    I'm afraid that it's not possible yet !

    Regards.

    Comment


    • #3
      Hello SylvainLAURENT,

      Could you please tell us what type of file you are trying to modify?

      Regards,
      Sherwin

      Comment


      • #4
        Hi Sherwin,

        First of all I create a Template.txt file on my SDCard.

        When the user want to create a new article with my application (on the display), the program create a new file with the content of the template.txt + several values.

        The values entered by the user (not a constant) should be added in this file between < and > characters.

        Code:
        d1.t1<53>
        d1.t2<12345>
        d1.t3<27>
        ....
        I began this methode :
        1. find byte by byte the character '<'.
        2. copy the read buffer until this character in the new file.
        3. write the user value (e.g 53) in the new file.
        4. find the next character '<'. So goto 1... until the end of template.txt

        It work fine, but if an other method exist .... ?

        Regards.
        Attached Files

        Comment


        • SylvainLAURENT
          SylvainLAURENT commented
          Editing a comment
          Thanks a lot Sherwin.

          I'm trying the code using value as interger.
          But if I edit the file with a NotePad, the values are readable or not ?

          regards.
          Sylvain

        • sherwin4D
          sherwin4D commented
          Editing a comment
          Yes, text file created with notepad should be readable. But you don't have to use notepad to create a text file, FILE_WRITE and FILE_APPEND mode of file_Open() function will automatically create one. Kindly refer to the DIABLO16 Internal Functions Manual(page 306) for more information on this.

          BR,
          Sherwin

        • SylvainLAURENT
          SylvainLAURENT commented
          Editing a comment
          Of course Sherwin .
          Notepad is just to verify the content of the file.

          Thanks.
          Sylvain.
      Working...
      X