Hi,
I'm building a data logger using Arduino and Adafruit's Micro SD breakout board.
The program uses the Arduino core SD library.
So, the thing is: the Arduino should log the data once a minute to a file. So far, there's no problem.
But once a hour, the Arduino should create a backup of the logfile. The program should copy the file from the root of the SD to the backup-folder.
I didnt find a function to copy files on the SD card.
How can I do this?
SD Shield: Copy/Rename Files
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_mike
- Posts: 67454
- Joined: Thu Feb 11, 2010 2:51 pm
Re: SD Shield: Copy/Rename Files
There is no copy function.
You'll have to open two files, read the old one, and write the same information to the new one.
You'll have to open two files, read the old one, and write the same information to the new one.
- pierrot10
- Posts: 349
- Joined: Tue Nov 17, 2015 4:34 pm
Re: SD Shield: Copy/Rename Files
Hello,
Would it be a good idea to add the rename/move function to be able to rename a file?
I think it could be a very good option.
Cheers
Would it be a good idea to add the rename/move function to be able to rename a file?
I think it could be a very good option.
Cheers
- adafruit_support_mike
- Posts: 67454
- Joined: Thu Feb 11, 2010 2:51 pm
Re: SD Shield: Copy/Rename Files
It isn't our library.
Please be positive and constructive with your questions and comments.