user21624: Out of curiosity, I am trying to upload a simple hex file to Arduino UNO using avrdude from windows command prompt.  
As per this forum, I tried to implement it. But got stuck at 

avrdude: ser_open(): can't open device "COM41": The system cannot find the file
  specified.

This command was directly imported from Arduino IDE verbose, and also it works fine when uploaded with Arduino IDE. I checked both the device and syntax are correct unless I would not be able to generate the hex file by Arduino compiler.
P.S. I have installed Winavr separately although it was pre-installed by Arduino
itself.
Here is a snapshot of the error 
What could be the possible reason for it to fail? Please notify, if anything is missing.

user24064: can't open device "COM41": The system cannot find the file specified.

This means there is no device at COM41. This may be due to 2 reasons: 

You may not have connected your arduino. If this is the case then you please connect the arduino and retry
Your arduino might be on a different COM port. If this is the case, then, go to device manager and check your arduino's COM port and replace COM41 with that and retry.


user21624: After a lot of experiment, I finally made it. I got to know from some forum that when COM PORT is greater than 10, you have to put a '.' after COM PORT setting e.g. -P.COM41. 
But, unfortunately that did not work. Then I changed the COM PORT to under 10 in device manager -> Properties -> COM Port Setting -> Advanced Setting; e.g. COM6.
Then it worked. At the time of flash just I have to press the RST button for once.
And now bingo!!
Still, I will try to find out why it didn't work with higher COM Port.

21624: <p>Out of curiosity, I am trying to upload a simple hex file to Arduino UNO using avrdude from windows command prompt.  </p>

<p>As per <a href="https://asensar.com/blog/2013/programming-arduino-using-avrdude/" rel="nofollow noreferrer">this forum</a>, I tried to implement it. But got stuck at </p>

<blockquote>
  <p>avrdude: ser_open(): can't open device "COM41": The system cannot find the file
  specified.</p>
</blockquote>

<p>This command was directly imported from Arduino IDE verbose, and also it works fine when uploaded with Arduino IDE. I checked both the device and syntax are correct unless I would not be able to generate the hex file by Arduino compiler.</p>

<p>P.S. I have installed Winavr separately although it was pre-installed by Arduino
itself.</p>

<p>Here is a snapshot of the error <a href="https://i.stack.imgur.com/nWwWW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nWwWW.png" alt="command prompt"></a></p>

<p>What could be the possible reason for it to fail? Please notify, if anything is missing.</p>
 24064: <pre><code>can't open device "COM41": The system cannot find the file specified.
</code></pre>

<p>This means there is no device at <code>COM41</code>. This may be due to 2 reasons: </p>

<ol>
<li><p>You may not have connected your arduino. If this is the case then you please connect the arduino and retry</p></li>
<li><p>Your arduino might be on a different COM port. If this is the case, then, go to device manager and check your arduino's COM port and replace <code>COM41</code> with that and retry.</p></li>
</ol>
 21624: <p>After a lot of experiment, I finally made it. I got to know from some forum that when COM PORT is greater than 10, you have to put a '.' after COM PORT setting e.g. -P.COM41. </p>

<p>But, unfortunately that did not work. Then I changed the COM PORT to under 10 in device manager -> Properties -> COM Port Setting -> Advanced Setting; e.g. COM6.
Then it worked. At the time of flash just I have to press the RST button for once.
And now bingo!!</p>

<p>Still, I will try to find out why it didn't work with higher COM Port.</p>
