Дмитрий Максимов (dmitry_maximov) wrote,
Дмитрий Максимов
dmitry_maximov

Маразмы

Раз(findCD.vbs):
Set fso = CreateObject("Scripting.FileSystemObject")
Set dc = fso.Drives

'WScript.Echo dc.Count
For Each d in dc
'  WScript.Echo d.DriveLetter, d.DriveType
  If d.DriveType = 4 then Exit For
 Next

WScript.Echo d.DriveLetter & ":"

Set dc = Nothing
Set fso = Nothing

и два:

for /f %I in ('cscript //nologo findCD.vbs') do cd /d %I
Tags: работа
Subscribe
  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 0 comments