They both convey a current state of affairs by making it sound as if the AC/file is incapable of carrying out the function mentioned. Of course, neither AC nor a file can actually "do" something in the same way a person "does" something.
The AC won't switch on/off = It is impossible for me/us to switch the AC on or off
The file won't open = I/We can't open the file.
It's a common enough usage of "won't" or "will not" to mean that it is impossible to do something or to make something happen.
"My son won't eat vegetables" - this is not the future tense. It's a statement of habitual action meaning "My son refuses to eat vegetables". We use "won't" to mean "refuse(s) to".
I won't watch anything with Angelina Jolie in.
My kids won't eat anything green.
Mr Jones won't accept bad behaviour in his classroom.