By using this site, you agree to our Privacy Policy and our Terms of Use. Close

Forums - PC - Batch file help please.

How do I query a DVD volume label from a batch file and pass that as a variable to a program?

Kind of like:

vol d: = %1
md v:\videos\%1
vlc.exe dvdsimple://d: transcode stuff goes here v:\videos\%1\%1.avi

Any ideas?



Around the Network

If you can't find a better solution, someone has a small utility which can retrieve the label to a variable:

http://www.goodells.net/dan/pclib.htm#voltest



My Mario Kart Wii friend code: 2707-1866-0957

Cheers for that. It works a treat.



Just a quick follow up.
voltest doesn't work in vista, so I downloaded a program called varset.

Here is the batch code if anyone is intersted:

varset label=vol d: > label.bat
call label.bat
md %userprofile%\videos\%label%
"c:\program files\videolan\vlc\vlc.exe" -vvv dvdsimple://d: :sout=#transcode{vcodec=WMV2,vb=1500,scale=1,acodec=wma,ab=96,channels=2}:duplicate{dst=std{access=file,mux=asf,dst="%userprofile%\videos\%label%\%label%.wmv"}}
cscript eject.vbs

http://home.mnet-online.de/horst.muc/int/varset12.zip contains the program that needs to go in the windows folder.

Now all I need to do is work out an easy way of creating a custom autorun handler in vista.