ÁöÁ¤ÇÑ µå¶óÀ̺곪 ³×Æ®¿öÅ© °øÀ¯ ¿µ¿ª¿¡¼ »ç¿ë °¡´ÉÇÑ °ø°£ÀÇ Å©±â¸¦ ¹ÝȯÇÑ´Ù.
object´Â Ç×»ó Drive °³Ã¼ÀÌ´Ù.
¼Ó¼º°ªÀº ÁöÁ¤ÇÑ µå¶óÀ̺곪 ³×Æ®¿öÅ© °øÀ¯ ¿µ¿ª¿¡¼ »ç¿ëÇÒ ¼ö ÀÖ´Â Å©±â¸¦ ¹ÙÀÌÆ® ´ÜÀ§·Î ³ªÅ¸³»´Â Á¤¼ö°ªÀÌ´Ù.
ÀÌ ¼Ó¼ºÀº ÀбâÀü¿ë·Î µðÆúÆ®°ªÀº ¾ø´Ù.
ÁöÁ¤ÇÑ µå¶óÀ̺곪 ³×Æ®¿öÅ© °øÀ¯ ¿µ¿ª¿¡¼ »ç¿ëÀÚ°¡ »ç¿ëÇÒ ¼ö ÀÖ´Â °ø°£ÀÇ Å©±â¸¦ byte ¼ö·Î ¹ÝȯÇÑ´Ù.
FreeSpace ¼Ó¼ºÀÌ ¹ÝȯÇÏ´Â °ªÀº º¸Åë AvailableSpace ¼Ó¼ºÀÌ ¹ÝȯÇÏ´Â °ª°ú °°´Ù.
±×·¯³ª ÇÒ´ç·®À» Áö¿øÇÏ´Â ÄÄÇ»ÅÍ ½Ã½ºÅÛ¿¡¼´Â µÎ °ªÀÌ ¼·Î ´Ù¸¦ ¼öµµ ÀÖ´Ù.
<SCRIPT language=JScript> function FreeSpaceTest(){ 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.FreeSpace+' byte<BR>'; else str+='Áغñ ¾ÈµÊ<BR>'; } return(str); } </SCRIPT> <DIV id=showjs class=show alt="°á°ú">°á°ú Ç¥½Ãâ</DIV> <DIV class=show onClick="showjs.innerHTML=FreeSpaceTest()"> <SPAN class=ie>JScript</SPAN> <SPAN class=property>FreeSpace</SPAN> ¼Ó¼º ¿¹Á¦</DIV>
<SCRIPT language=VBScript> Function FreeSpaceTestvb() 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.FreeSpace&" byte<BR>" Else str=str&"Áغñ ¾ÈµÊ<BR>" End If Next FreeSpaceTestvb=str End Function </SCRIPT> <DIV id=showvb class=show alt="°á°ú">°á°ú Ç¥½Ãâ</DIV> <DIV class=show onClick="showvb.innerHTML=FreeSpaceTestvb()"> <SPAN class=ie>VBScript</SPAN> <SPAN class=property>FreeSpace</SPAN> ¼Ó¼º ¿¹Á¦</DIV>