# SD File problem

**URL:** <https://forum.arduino.cc/t/sd-file-problem/1449425>\
**Category:** Storage\
**Created:** [June 23, 2026, 8:50am UTC](https://forum.arduino.cc/t/sd-file-problem/1449425 "2026-06-23T08:50:16Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![Deva\_Rishi](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/deva_rishi/32/227254_2.png) [@Deva\_Rishi](https://forum.arduino.cc/u/Deva_Rishi)\
**Post date:** [June 24, 2026, 12:03pm UTC](https://forum.arduino.cc/t/sd-file-problem/1449425/21 "2026-06-24T12:03:40Z")

</div>

> [@b707](#):
>
> but do any minor change - for example, add a space or an empty line where it doesn't affect anything. The point is to make the new code different from the old one, forcing the compiler to rebuild the project. But don't change the file name.

Make sure the change is actually relevant, otherwise it may get optimized away. So add a space or empty line in the Serial output, not just anywhere.

---

<div class="post-metadata">

**Author:** ![rog\_d](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/rog_d/32/1213549_2.png) [@rog\_d](https://forum.arduino.cc/u/rog_d)\
**Post date:** [June 24, 2026, 2:50pm UTC](https://forum.arduino.cc/t/sd-file-problem/1449425/22 "2026-06-24T14:50:39Z")

</div>

Unfurtunately, I had already dismantled it and put another project together.  
However, I have wired it up again as I was very interested in the result of what you suggested as I hadn't tried that scenario.  
Upon wiring completion I plugged in the SD card, connected the USB power lead and compiled the code. File retrieval was good every time. Just to replicate the fault, I then left the card plugged in, the power on, changed the file name, and recompiled the code. And what do you know..... it worked. I tried it several times and it worked fine every time. I then change the file name back to the other file and tried again. It still worked fine. I am absolutely gobsmacked....... I spent hours on this yesterday and could replicate the fault every time. Now I can't replicate the fault at all. Do you think it could have been a connection problem? The code is exacly the same.

[Previous page](https://forum.arduino.cc/t/sd-file-problem/1449425.md?page=1)
