CMD Script for differentiate optical media type? RRS feed

  • Question

  • Hi,

    I want to write an executeable cmd script which writes me a file on a fixed path with a value inside which makes it

    possible for me to see what media type is inside of my optical drive.

    I want to differentiate music cds, video dvds and "empty" drives.

    Something like that:


    string filePath = "c:/drive.txt"
    string cdDrive = "d:/"
    if (cdDrive == "empty"):
    fileWrite(filePath, "0");
    else if (cdDrive == "musik cd"):
    fileWrite(filePath, "1");
    else if (cdDrive == "video dvd"):
    fileWrite(filePath, "2");

    Thanks for any kind of help ! :)

    Monday, March 16, 2015 10:45 AM