Scripting Runtime Library(FileSystemObject)

ÁöÁ¤ÇÑ µå¶óÀ̺꿡¼­ »ç¿ëÇÏ´Â ÆÄÀÏ ½Ã½ºÅÛÀÇ Çü½ÄÀ» ¹ÝȯÇÑ´Ù.

Àμö
object : (°³Ã¼)

object´Â Ç×»ó Drive °³Ã¼ÀÌ´Ù.

: {¼Ó¼º ¹®ÀÚ¿­)
¼Ó¼º°ªÀº ÁöÁ¤ÇÑ µå¶óÀ̺êÀÇ Çü½ÄÀÎ ÆÄÀÏ ½Ã½ºÅÛÀ» ³ªÅ¸³»´Â ¹®ÀÚ¿­ÀÌ´Ù.

»ç¿ëÇÒ ¼ö ÀÖ´Â ¹Ýȯ Çü½Ä¿¡´Â FAT, NTFS, CDFS µîÀÌ Æ÷ÇԵȴÙ.

ÀÌ ¼Ó¼ºÀº ÀбâÀü¿ëÀÌ¸ç µðÆúÆ®°ªÀº ¾ø´Ù.


FileSystem ¼Ó¼º ¿¹Á¦

°á°ú Ç¥½Ãâ
JScript FileSystem ¼Ó¼º ¿¹Á¦
<SCRIPT language=JScript>
function FileSystemTest(){
  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.FileSystem+'<BR>';
    else str+='Áغñ ¾ÈµÊ<BR>';
  }
  return(str);
}
</SCRIPT>

<DIV id=showjs class=show alt="°á°ú">°á°ú Ç¥½Ãâ</DIV>
<DIV class=show onClick="showjs.innerHTML=FileSystemTest()">
  <SPAN class=ie>JScript</SPAN> <SPAN class=property>FileSystem</SPAN> ¼Ó¼º ¿¹Á¦</DIV>

VBScript·Î ¹Ýº¹

°á°ú Ç¥½Ãâ
VBScript FileSystem ¼Ó¼º ¿¹Á¦
<SCRIPT language=VBScript>
Function FileSystemTestvb()
  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.FileSystem&"<BR>"
    Else str=str&"Áغñ ¾ÈµÊ<BR>"
    End If
  Next
  FileSystemTestvb=str
End Function
</SCRIPT>

<DIV id=showvb class=show alt="°á°ú">°á°ú Ç¥½Ãâ</DIV>
<DIV class=show onClick="showvb.innerHTML=FileSystemTestvb()">
  <SPAN class=ie>VBScript</SPAN> <SPAN class=property>FileSystem</SPAN> ¼Ó¼º ¿¹Á¦</DIV>