avrdude can't find com

The Arduino IDE does a special process when uploading to the Leonardo that doesn't happen when you are uploading using avrdude directly.

The bootloader on the ATmega32U4 runs for several seconds after the microcontroller is reset. The bootloader must be running for avrdude to to the upload. In order to make uploading easy, the Arduino IDE automates this reset process. That is done by opening a serial connection to the COM port of the board at 1200 baud. The Leonardo has code that runs in the background of your sketch and sees that 1200 baud connection as a signal to reset the microcontroller. The Arduino IDE then watches for the first COM port to be enumerated on the system, then runs the avrdude command to upload to that port.

So in order to upload using avrdude directly, you need to manually reset the Leonardo by pressing the reset button before running the avrdude command. But you also need to figure out what the correct COM port is to use in your avrdude command. The Leonardo will likely have a different COM port number when the bootloader is running than when the bootloader is running. So do a reset and then quickly check the com port before the bootloader times out and exits to the sketch.