Announcement

Collapse
No announcement yet.

Read or write in a specific folder on SDcard

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

  • SylvainLAURENT
    commented on 's reply
    Of course Sherwin .
    Notepad is just to verify the content of the file.

    Thanks.
    Sylvain.

  • sherwin4D
    commented on 's reply
    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
    commented on 's reply
    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
    commented on 's reply
    Kindly check this thread for alternative method that you could apply to your project:
    Write and read variables on SD card
    https://forum.4dsystems.com.au/node/63451

    Also, could you please post the snippet of your code? To be specific, the method that you have mentioned.

    Thanks and regards,
    Sherwin

  • SylvainLAURENT
    replied
    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

    Leave a comment:


  • sherwin4D
    replied
    Hello SylvainLAURENT,

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

    Regards,
    Sherwin

    Leave a comment:


  • SylvainLAURENT
    replied
    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.

    Leave a comment:


  • SylvainLAURENT
    started a topic Read or write in a specific folder on SDcard

    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
Working...
X