Uploading with Atmel Studio 6

I am new to Atmel Studio and trying to get some code uploaded to an Arduino Due. I'm having no luck getting it to act like the Arduino IDE. My board shows up as COM5 normally and COM11 when in program mode. I appear to get a successful write in Atmel Studio but it always stays COM11 instead of going back to COM5. Which COM port should be used in this batch file?