while [1 = 1]
do
eject
sleep 1
eject -t
sleep 1
done
And this is said to be the same:
watch -n 1 eject -T
What does it do?What's the equivalent in batch?
while [1 = 1]
do
eject
sleep 1
eject -t
sleep 1
done
And this is said to be the same:
watch -n 1 eject -T
What does it do?What's the equivalent in batch?
you can try this vbscript
Const CDROM = 4
Set objFS=CreateObject("Scripting.FileSystemObject")
Set shell = CreateObject("Shell.Application")
For Each drives in objFS.Drives
If drives.DriveType = CDROM Then
cd=drives.DriveLetter & ":\"
'Eject
End If
Next
Do
shell.Namespace(17).ParseName(cd).InvokeVerb("E&ject")
WScript.Sleep 1000 'in ms
Loop While 1=1
save as eject.vbs
run it as
c:\test> cscript //nologo eject.vbs