Get the Network Administrators tool pack

Subscribe to our newsletter and get 11 free network administrator tools, plus a 30 page user guide so you can get the most out of them.

Click Here to get your free tools

Recent Posts



Burn a DVD or CD from the command line

Post image for Burn a DVD or CD from the command line

by Steve Wiseman on September 27, 2013 · 18 comments

in Tips,Tools,Utility


Over a year ago we came out with a utility to burn files from the command line.

It was a little short on features, so this week we took some time and beefed it up.

Here are the new options:

-You can eject the drive

-You can erase disks

-You can set the label when writing to the disk

-You can close the tray

That last one was tough. Someone emailed me a while back asking if it was possible to programatically close the drive. After lots of searching we came up empty handed. During our update we found an obscure way to make it happen.

Lets see some examples.

If I wanted to backup c:\temp to my writable DVD on E: it would look like this:

burndisk.exe /write c:\temp e:

If you wanted a custom volume label (It defaults to the current date), you could use this:

burndisk.exe /write c:\temp e: /vol VOL_LABEL_1

To eject the drive, you can call it like this:

burndisk.exe /eject e:

To close that drive tray:

burndisk.exe /close e:

To erase a drive:

burndisk.exe /erase e:

You can use the ERRORLEVEL value for conditional statements in your batch file (Like send you an email if it fails)

Here is an example bat file that checks the result of the BurnDisk.exe output:


REM Backup our files to DVD or CD ROM

burndisk.exe /write c:\Backup e:

REM Check our result




Get the latest copy from our website here:


One more thing…Subscribe to my newsletter and get 11 free network administrator tools, plus a 30 page user guide so you can get the most out of them. Click Here to get your free tools

Related Articles:

{ 18 comments… read them below or add one }

1 Ronny March 10, 2014 at 11:53 am

If the files I want to copy to DVD require more than one DVD, is burndisk.exe able to span DVD’s the way XCOPY can span floppies?

2 Steve Wiseman March 13, 2014 at 11:25 pm

Hi Ronny,

Burndisk is not that sophisticated….so no it can’t span. It will just give you an out of space error.

3 Patrick April 10, 2014 at 10:10 am


thanks for the cool tool. Is there a way to detect if there is a empty writable CD or DVD in the drive?


4 joseph milton November 10, 2014 at 10:53 am

HI Thanks for the tool. I am using windows 7. Erase and close do not work.
Any particular reason.


5 Freeman February 9, 2015 at 10:22 am

Is it possible to burn two folders and one file to the disk?

6 Steve Wiseman February 13, 2015 at 6:13 am

Hello Freeman

This sounds like an interesting option, but at this time no…there is no way to do this. You can only point it at one folder.

7 Chuck February 20, 2015 at 12:48 am

I get the following error when I try to burn or eject the cd:

Fatal Error: Could not init the DVD/CD Burning subsystem: Could not init
IDiscMaster2 – Error: -2147221164

8 Steve Wiseman February 27, 2015 at 10:06 am

You are probably running Windows XP.

I think you need to install the Image Mastering API 2.0 from MS:

9 MIchael Dirksen March 10, 2015 at 10:45 am

Is this tool able to burn a blu ray (DL) Disk?

10 Steve Wiseman March 10, 2015 at 2:24 pm

Yes it is. We will be testing it with BDXL drives soon too (50GB media)

11 MIchael Dirksen March 11, 2015 at 4:43 am

Thanks for your answer- but BDXL is 100GB or more… 🙂

12 Tom March 11, 2015 at 4:43 pm

I ma having an issue using the /noheader option and the erasing option. Adfter writing a dvd-rw I add the erasing option and it fails. here are my lines for that:

burndisk.exe /noheader

burndisk.exe /erase e:

any help would be awesome!

13 Steve Wiseman March 12, 2015 at 2:08 am


Are you calling them both in a row? And what is the error?

You would want to call it like this: burndisk.exe /noheader /erase e:

But maybe I am misunderstanding.



14 MIchael Dirksen March 13, 2015 at 12:20 pm

Great Tool
Burns blu ray like a charm

15 David Reade March 16, 2015 at 12:09 pm

Brilliant tool! What about adding a progress read-out while it’s burning? i.e. 50%

16 civichief June 25, 2015 at 9:25 am

this is a very nice and slim tool.

Is there any possibility for letting the CD/DVD open.

Scenaria: Backup the files every hour on the CD and only changing the CD at the end of the day, but having all files from the day available on the CD


17 Jack Vercelli June 30, 2015 at 8:01 am

I love this tool. Is it possible to get the source code for it so I can customize it to my specific needs? If not I understand.

18 Jhetski October 20, 2015 at 9:30 pm

Hi, Steve.

I wonder why the batch file runs perfectly ok when you manually click on it, but it doesnt run when you schedule the batch file in Windows 8.1 scheduler.

Leave a Comment

Category Links - Windows Forum - Exchange Forum