fs.readdir and fs.unlink problems #326
Replies: 11 comments
-
Posted at 2014-11-26 by @gfwilliams Hi - I think it may just be that you're using the wrong type of slash (and I'm not sure you need the first one either)... Try |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-11-26 by Hellis Wow! But you are correct! it was the slash Thanks! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-11-30 by Hellis Ok now I have managed to hit the next problem. Don't know if its the code that is incorrect or if it's something else. I have commented out the print-line as I only used it as "debug" when writing the code.
Any suggestions why it doesn't run when I use my phone as power supply? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-12-01 by @gfwilliams It'll be because your code is running as soon as you send it to Espruino. Try wrapping it up into a function - there's a special one called
Or it might be more sensible to do it only when you press a button:
I've also added |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-12-01 by Hellis This code works great for <32 GB cards. Is there a workaround for that?
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-12-01 by @gfwilliams Well, it looks like you can reformat the larger SD cards as FAT32, and then they'll work - at least according to this It's just that as the come out of the box they have exfat on them, which it looks like the FatFS library I use doesn't support. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-12-01 by Hellis I noticed that too after googling a while. 10% @ about 30 minuts.... |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-12-01 by Hellis
Thats odd. It's only a 64 GB SD card |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-12-01 by @gfwilliams :( It only told you after it had got some way of the way through? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-12-01 by Hellis It had to go all the way to 100% before telling me :-) I had such high hopes on DOS and it let me down.... I have not had any hopes on Win since 3.11 and now DOS lets me down too. I guess I have to find another way. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-12-01 by Hellis Verbatim FAT32 tool works great! And I once it was formated as FAT32 the code works perfect! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2014-11-26 by Hellis
How do I browse subfolders and unlink files in subfolders?
The picture shows how I can read the root and first subfolder, but not the second subfolder.
And I can delete a file in the root but I can't delete them in subfolders.
What am I doing wrong?
Attachments:
Beta Was this translation helpful? Give feedback.
All reactions