½ÇÁ¦ ·ÎÄà µå¶óÀ̺êÀ̳ª ³×Æ®¿öÅ© °øÀ¯ ¿µ¿ªÀÇ µå¶óÀÌºê ¹®ÀÚ¸¦ ¹ÝȯÇÑ´Ù.
object´Â Ç×»ó Drive °³Ã¼ÀÌ´Ù.
¼Ó¼º°ªÀº ½ÇÁ¦ ·ÎÄà µå¶óÀ̺êÀ̳ª ³×Æ®¿öÅ© °øÀ¯ ¿µ¿ªÀÇ µå¶óÀ̺긦 ³ªÅ¸³»´Â ¹®ÀÚ¿ÀÌ´Ù.
ÀÌ ¼Ó¼ºÀº ÀбâÀü¿ëÀÌ¸ç µðÆúÆ®°ªÀº ¾ø´Ù.
½ÇÁ¦ ·ÎÄà µå¶óÀ̺êÀ̳ª ³×Æ®¿öÅ© °øÀ¯ ¿µ¿ªÀÇ µå¶óÀÌºê ¹®ÀÚ¸¦ ¹ÝȯÇÑ´Ù.
³×Æ®¿öÅ© °øÀ¯ ¿µ¿ªÀÌ µå¶óÀÌºê ¹®ÀÚ¿¡ ¿¬°áµÇÁö ¾Ê´Â °æ¿ì¿Í °°ÀÌ ÁöÁ¤ÇÑ µå¶óÀ̺갡 µå¶óÀÌºê ¹®ÀÚ¿¡ ¿¬°áµÇÁö ¾ÊÀ¸¸é DriveLetter ¼Ó¼ºÀº ºó ¹®ÀÚ¿("")À» ¹ÝȯÇÑ´Ù.
<SCRIPT language=JScript> function DriveLetterTest(drivePath){ var fso,driveObj,str; fso=new ActiveXObject('Scripting.FileSystemObject'); driveObj=fso.GetDrive(fso.GetDriveName(drivePath)); str='µå¶óÀ̺ê '+driveObj.DriveLetter.toUpperCase()+': - '; str+=driveObj.VolumeName+'<BR>'; str+='»ç¿ë °¡´ÉÇÑ °ø°£: '+driveObj.AvailableSpace/1024+'KB<BR>'; str+='FileSystem: '+driveObj.FileSystem; return(str); } </SCRIPT> <DIV id=showjs class=show alt="°á°ú">°á°ú Ç¥½Ãâ</DIV> <DIV class=show onClick="id=showjs.innerHTML=DriveletterTest('C:\\')"> <SPAN class=ie>JScript</SPAN><SPAN class=property>Drive</SPAN> ¼Ó¼º ¿¹Á¦</DIV>
<SCRIPT language=VBScript> Function DriveLetterTestvb(drivePath) Dim fso,driveObj,str Set fso=CreateObject("Scripting.FileSystemObject") Set driveObj=fso.GetDrive(drivePath) str="µå¶óÀ̺ê "&driveObj.DriveLetter&": - "&driveObj.VolumeName&"<BR>" str=str&"»ç¿ë °¡´ÉÇÑ °ø°£: "&FormatNumber(driveObj.FreeSpace/1024,0)&" KB<BR>" str=str&"FileSystem: "&driveObj.FileSystem DriveLetterTestvb=str End Function </SCRIPT> <DIV id=showvb class=show alt="°á°ú">°á°ú Ç¥½Ãâ</DIV> <DIV class=show onClick="showvb.innerHTML=DriveLetterTestvb('C:\\')"> <SPAN class=ie>VBScript</SPAN><SPAN class=property>DriveLetter</SPAN> ¼Ó¼º ¿¹Á¦</DIV>