I needed to copy a lot of CDs so I wrote this little automation. When a CD is copied the tray opens and after the next CD is in, copying is started automatically. Every CD is copy to another (generated) subfolder.
It is my first script, but I liked AHK that much, that I made a GUI for it. If you want it, just PM me.
#SingleInstance
;-----User Change------------------------------------------------------
LAUFWERK = x:
ZIEL = c:\_incoming\temp
;----/User Change------------------------------------------------------
INDEX = 1
Loop
{
DriveGet, STATUS, StatusCD, %LAUFWERK%
if STATUS <> stopped ;CD drin und inaktiv?
{
Sleep, 2000
continue
}
else ;jawoll und los
{
;create unique dir
Loop
{
FileGetTime, TEMP, %ZIEL%\CD%INDEX% ;Dir schon da?
if ErrorLevel = 0
INDEX += 1
else
break
}
;now copy
FileCopyDir, %LAUFWERK%, %ZIEL%\CD%INDEX%, 0
if ErrorLevel = 0
{
Drive, Eject, %LAUFWERK%
Sleep, 5000
}
else
{
MsgBox, 4112, Bitte prüfen!!!, Ein Kopierfehler ist aufgetreten
break
}
}
}
return




