µå¶óÀ̺곪 ³×Æ®¿öÅ© °øÀ¯ ¿µ¿ªÀÇ Àüü °ø°£À» ¹ÙÀÌÆ® ´ÜÀ§·Î ¹ÝȯÇÑ´Ù.
objectName´Â Ç×»ó Drive °³Ã¼ÀÌ´Ù.
ÀÌ ¼Ó¼ºÀº ÀбâÀü¿ëÀÌ¸ç µðÆúÆ®°ªÀº ¾ø´Ù.
ÁöÁ¤ÇÑ µå¶óÀ̺곪 ³×Æ®¿öÅ© °øÀ¯ ¿µ¿ªÀÇ Àüü °ø°£ÀÇ Å©±â¸¦ byte ¼ö·Î ¹ÝȯÇÑ´Ù.
<SCRIPT language=JScript> function TotalSizeTest(){ var fso,driveObj,str=''; fso=new ActiveXObject('Scripting.FileSystemObject'); enumObj=new Enumerator(fso.Drives); for (; !enumObj.atEnd(); enumObj.moveNext()){ driveObj=enumObj.item(); str+='µå¶óÀ̺ê '+driveObj.DriveLetter+': - '; if (driveObj.IsReady) str+=driveObj.TotalSize+' byte<BR>'; else str+='Áغñ ¾ÈµÊ<BR>'; } return(str); } </SCRIPT> <DIV id=showjs class=show alt="°á°ú">°á°ú Ç¥½Ãâ</DIV> <DIV class=show onClick="showjs.innerHTML=TotalSizeTest()"> <SPAN class=ie>JScript</SPAN> <SPAN class=property>TotalSize</SPAN> ¼Ó¼º ¿¹Á¦</DIV>
<SCRIPT language=VBScript> Function TotalSizeTestvb() Dim fso,driveObj str="" Set fso=CreateObject("Scripting.FileSystemObject") Set drivesCol=fso.Drives For Each driveObj in drivesCol str=str&"µå¶óÀ̺ê "&driveObj.DriveLetter&": - " If driveObj.IsReady Then str=str&driveObj.TotalSize&" byte<BR>" Else str=str&"Áغñ ¾ÈµÊ<BR>" End If Next TotalSizeTestvb=str End Function </SCRIPT> <DIV id=showvb class=show alt="°á°ú">°á°ú Ç¥½Ãâ</DIV> <DIV class=show onClick="showvb.innerHTML=TotalSizeTestvb()"> <SPAN class=ie>VBScript</SPAN> <SPAN class=property>TotalSize</SPAN> ¼Ó¼º ¿¹Á¦</DIV>