I used the search but didn't found what I need. I want to create button that will copy label of inserted cd or dvd to clipboard (the label can have spaces.
For the reference, I found .bat file (see below) which creates folder named like cd/dvd label and copies the drive content to this folder. I need only copy the cd/dvd label to the clipboard, and this should work for any cd/dvd drive available (as I understand, the script below works only for f: drive). Thanks in advance for help!
@echo off
:Top
cls
set src=f:
set "dst=e:\dvd"
for /f "tokens=1-5*" %%a in ('vol %src%^|find "drive"') do (
set "vol=%%f")
set dst=%dst%%vol%
xcopy "f:*.*" "%dst%" /e /s
Echo Press Enter when ready to continue with next CD or DVD.
Echo Press Ctrl+C to terminate this batch program.
pause
goto Top