Sketch uploaded from hard drive won't fully function

Right now you are solidly in “that’s impossible” territory.

So. The sketches are 100 percent identical.

You are using the same IDE to open, compile and upload both sketches…

to the same UNO…

and one sketch works and the other doesn’t.

Yeah, there’s something else going on.

Have you tried saving the sketch from the USB to the hard drive with a different name so it doesn’t over write the original hard drive sketch? To see if that works?

And vice versa, save the hard drive sketch to the USB drive with a different name so it doesn’t over write the original USB sketch? To see if that works?

What else is on the USB drive? Does your sketch have multiple tabs? What libraries does it use if any?

What is # included in your sketch?

Yes, not all of those should cause such a problem I don’t think.

a7