avrdude: ser_open(): can't open device

Arduino IDE shows an error:

An error occurred while uploading the sketch avrdude: ser_open(): can't open device "\\.\COM7": The system cannot find the file specified.

How can I solve it?

Answer

You should do a checklist in order to jump to a conclusion:

Arduino IDE - How to select com port

If the COM port is available on Arduino IDE:

If the COM port is NOT available on Arduino IDE:

Buy Arduino

1 × Arduino UNO Buy on Amazon
1 × USB 2.0 cable type A/B Buy on Amazon
1 × Jumper Wires Buy on Amazon
Please note: These are Amazon affiliate links. If you buy the components through these links, We will get a commission at no extra cost to you. We appreciate it.

The Best Arduino Starter Kit

※ OUR MESSAGES