Avrdude not working with Arduino Micro

Here's why it keeps failing:

As soon as I press the reset button the number of the ttyACM changes. Usually it goes up by one but it might also go back and forth between two numbers.

So I'm looking at ttyACM0 and as soon as I send the reset command (see below) I would have to send the programming command to ttyACM1. I havn't tested what happens exactly if this number exists. I'm assuming it takes the next unused number.

So if I see ttyACM0 I need to do a reset with
avrdude -patmega32u4 -carduino -P/dev/ttyACM0 -b1200

Then I can program the Micro with
avrdude -patmega32u4 -cavr109 -P/dev/ttyACM1 -b57600 -D -Uflash:w:/"path_2_file"/"filename".ino.hex:i

Resetting only works with -c arduino while programming works only with -c avr109.

Now it actually works for the first time (with one sinle board)!
At this point I only have to figure out what exactly happens with the numbering if I have 3 boards.