bdunkleysmith Active Member Licensed User Longtime User Apr 30, 2018 #1 I am working on an application in which I save SSID passwords to individual files on the ESP8266 using rESP8266FileSystem. During development I appear to have accidentally created a file with a null file name which is 8 bytes long, in addition to another valid file as indicated by the result when I run Code: Copy Sub ListFiles Log("Listing password files:") For Each f As File In fs.ListFiles("") Log("Name: ", f.Name, ", Size: ", f.Size) Next End Sub Listing password files: Name: , Size: 8 Name: Telstra1943, Size: 8 Having a null file name apparently means this code Code: Copy For Each f As File In fs.ListFiles("") fs.Remove(f.Name) Next fails or at least doesn't delete the file. Any suggestions as to how I can clear the files from the flash - it doesn't matter if I have to delete any valid files in the process because I can recreate those once the filesystem is purged. Thanks in anticipation of suggestions.
I am working on an application in which I save SSID passwords to individual files on the ESP8266 using rESP8266FileSystem. During development I appear to have accidentally created a file with a null file name which is 8 bytes long, in addition to another valid file as indicated by the result when I run Code: Copy Sub ListFiles Log("Listing password files:") For Each f As File In fs.ListFiles("") Log("Name: ", f.Name, ", Size: ", f.Size) Next End Sub Listing password files: Name: , Size: 8 Name: Telstra1943, Size: 8 Having a null file name apparently means this code Code: Copy For Each f As File In fs.ListFiles("") fs.Remove(f.Name) Next fails or at least doesn't delete the file. Any suggestions as to how I can clear the files from the flash - it doesn't matter if I have to delete any valid files in the process because I can recreate those once the filesystem is purged. Thanks in anticipation of suggestions.
tigrot Well-Known Member Licensed User Longtime User Apr 30, 2018 #2 Once I created on a windows 10 folder a file with 0 size. I've been trying to delete it for years, with no success. I've tryed to use some utilty as well. Same result. Seems I've to format drive again to get rid of it. I'll do when I'll grow up! I think that formating will solve: http://esp8266.github.io/Arduino/versions/2.0.0/doc/filesystem.html for your reference Upvote 0
Once I created on a windows 10 folder a file with 0 size. I've been trying to delete it for years, with no success. I've tryed to use some utilty as well. Same result. Seems I've to format drive again to get rid of it. I'll do when I'll grow up! I think that formating will solve: http://esp8266.github.io/Arduino/versions/2.0.0/doc/filesystem.html for your reference
bdunkleysmith Active Member Licensed User Longtime User May 1, 2018 #3 Thanks Tigrot. I overlooked the Format function of the rESP8266FileSystem library and following your suggestion I have now successfully used that to solve my problem. Upvote 0
Thanks Tigrot. I overlooked the Format function of the rESP8266FileSystem library and following your suggestion I have now successfully used that to solve my problem.
Johan Hormaza Well-Known Member Licensed User Longtime User May 23, 2018 #4 And to create and fill a file ".txt" Upvote 0
tigrot Well-Known Member Licensed User Longtime User May 23, 2018 #5 bdunkleysmith said: rESP8266FileSystem Click to expand... Use this library to write on flash, open file, write and close as usual. I personally use a sd card. Upvote 0
bdunkleysmith said: rESP8266FileSystem Click to expand... Use this library to write on flash, open file, write and close as usual. I personally use a sd card.
Johan Hormaza Well-Known Member Licensed User Longtime User May 23, 2018 #6 tigrot said: Use this library to write on flash, open file, write and close as usual. I personally use a sd card. Click to expand... But how could I create a file. Thank you! Upvote 0
tigrot said: Use this library to write on flash, open file, write and close as usual. I personally use a sd card. Click to expand... But how could I create a file. Thank you!
tigrot Well-Known Member Licensed User Longtime User May 23, 2018 #7 Look https://www.b4x.com/android/forum/threads/resp8266filesystem-spiffs.76487/ Upvote 0
tigrot Well-Known Member Licensed User Longtime User May 23, 2018 #8 https://www.b4x.com/android/forum/threads/rsd-openreadwrite.67384/ Is related to sd, but the syntax is almost the same. Upvote 0
https://www.b4x.com/android/forum/threads/rsd-openreadwrite.67384/ Is related to sd, but the syntax is almost the same.