Does anyone know a way of downloading all files and directories in sd card? I have created a button in my web browser which I am going to use to download the entire sd card, but I am quite lost with the part of programming the downloading, I know how to download a csv file for example but not all files and directories.
I know how to download a csv file for example but not all files and directories.
Well, it hardly makes sense to try to download a directory. Downloading all the files in the directory makes sense. But, if you can do it for one file, doing it for all files seems simple enough. Just loop through all the files in the directory, and perform the same action.
The only challenge MIGHT be making the browser handle the different file types correctly.
PaulS:
Well, it hardly makes sense to try to download a directory. Downloading all the files in the directory makes sense. But, if you can do it for one file, doing it for all files seems simple enough. Just loop through all the files in the directory, and perform the same action.
The only challenge MIGHT be making the browser handle the different file types correctly.
Hi PaulS, loop through all the files would be indeed a viable solution, but it would mean downloading a very big amount of files in individual downloads, so it would be very messy. The thing is trying to download the entire directory in just one attempt.
For example: 2016/July/xxxx.csv, trying to download July knowing it might have 1000 files (for example).
but it would mean downloading a very big amount of files in individual downloads, so it would be very messy.
I don't see that downloading a directory (whatever that means) would involve any less data, nor do I see how it would be any "less messy" since the download process would have to recreate the directory structure anyway.
PaulS:
I don't see that downloading a directory (whatever that means) would involve any less data, nor do I see how it would be any "less messy" since the download process would have to recreate the directory structure anyway.
I mean downloading a folder that contains all the files, being the folder the directory root, 2016, July, etc.
I saw that the command wget() used for example as:
wget -r -l1 --no-parent
downloads an entire directory, but if I'm not wrong this is not available in arduino.