°á°ú Ç¥½Ã À§Ä¡
Ŭ¸¯ÇÏ¿© °á°ú¸¦ º¸¶ó.
<DIV id=showTextFile class=show style=width:700;margin-left:50>°á°ú Ç¥½Ã À§Ä¡</DIV>

<SCRIPT>
function ShowTextTest(fileVar){
  str='';
  var ForReading=1;ForWriting=2;
  fso=new ActiveXObject('Scripting.FileSystemObject');

  if (!fso.FileExists(fileVar)){
    fileObj=fso.OpenTextFile(fileVar,ForWriting,true);
    fileObj.WriteLine('Javascript ¿¹Á¦¸¦ À§ÇØ »ý¼ºµÈ È­ÀÏÀÌ´Ù.');
    fileObj.Write(fileVar+' FileÀÌ »ý¼ºµÇ¾ú´Ù.');
    fileObj.Close();
    str+='"'+fileVar+ '" »ý¼º ¿Ï·áµÇ¾ú´Ù.';
  }

  fileObj=fso.OpenTextFile(fileVar,ForReading);
  str+='<TABLE border=1 width=100%>';
  str+='<TR><TH>³»¿ë</TH><TH>ÄÚµå</TH><TH>°ª</TH></TR>';
  str+='<TR><TD rowspan=2>È­ÀÏ º»¹®</TD><TD>fileObj.ReadLine()</TD><TD>'+fileObj.ReadLine()+'</TD></TR>';
  str+='<TR><TD>fileObj.ReadLine()</TD><TD>'+fileObj.ReadLine()+'</TD></TR>';
  str+='<TR><TD>¼öÆò À§Ä¡</TD><TD>fileObj.Column</TD><TD>'+fileObj.Column+'</TD></TR>';
  str+='<TR><TD>¼öÁ÷ À§Ä¡</TD><TD>fileObj.Line</TD><TD>'+fileObj.Line+'</TD></TR>';
  str+='<TR><TD>ÁÙ ³¡Àΰ¡?</TD><TD>fileObj.AtEndOfLine</TD><TD>'+fileObj.AtEndOfLine+'</TD></TR>';
  str+='<TR><TD>È­ÀÏ ³¡Àΰ¡?</TD><TD>fileObj.AtEndOfStream</TD><TD>'+fileObj.AtEndOfStream+'</TD></TR>';
  str+='</TABLE>';
  showTextFile.innerHTML=str;
}
</SCRIPT>

<DIV class=show title="°á°ú" onClick="ShowTextTest('c:\\JsTest\\TestProp.txt')">Ŭ¸¯ÇÏ¿© °á°ú¸¦ º¸¶ó.</DIV>
°á°ú Ç¥½Ã À§Ä¡
Ŭ¸¯ÇÏ¿© °á°ú¸¦ º¸¶ó.
<DIV id=showProperty class=show style=width:780;margin-left:50>°á°ú Ç¥½Ã À§Ä¡</DIV>

<SCRIPT>
function ShowProperty(fileVar){
  str='';
  var ForReading=1;ForWriting=2;
  fso=new ActiveXObject('Scripting.FileSystemObject');

  if (!fso.FileExists(fileVar)){
    fileObj=fso.OpenTextFile(fileVar,ForWriting,true);
    fileObj.WriteLine('Javascript ¿¹Á¦¸¦ À§ÇØ »ý¼ºµÈ È­ÀÏÀÌ´Ù.');
    fileObj.Write(fileVar+' FileÀÌ »ý¼ºµÇ¾ú´Ù.');
    fileObj.Close();
    str+='"'+fileVar+ '" »ý¼º ¿Ï·áµÇ¾ú´Ù.';
  }

  file1=fso.GetFile(fileVar);
  paren=fso.GetFolder(file1.ParentFolder);

  str+='<TABLE border=1 width=100%>';
  str+='<TR><TH>³»¿ë</TH><TH>ÄÚµå</TH><TH>file1.¼Ó¼º°ª</TH><TH>paren.¼Ó¼º°ª</TH></TR>';
  str+='<TR><TD>¾ÖÆ®¸®ºäÆ®</TD><TD>Attributes</TD><TD>'+file1.Attributes+'</TD>';
  str+='<TD>'+paren.Attributes+'</TD></TR>';
  str+='<TR><TD>»ý¼ºÀÏ</TD><TD>DateCreated</TD><TD>'+file1.DateCreated+'</TD>';
  str+='<TD>'+paren.DateCreated+'</TD></TR>';
  str+='<TR><TD>Á¢¼ÓÀÏ</TD><TD>DateLastAccessed</TD><TD>'+file1.DateLastAccessed+'</TD>';
  str+='<TD>'+paren.DateLastAccessed+'</TD></TR>';
  str+='<TR><TD>¼öÁ¤ÀÏ</TD><TD>DateLastModified</TD><TD>'+file1.DateLastModified+'</TD>';
  str+='<TD>'+paren.DateLastModified+'</TD></TR>';
  str+='<TR><TD>µå¶óÀ̺ê</TD><TD>Drive</TD><TD>'+file1.Drive+'</TD>';
  str+='<TD>'+paren.Drive+'</TD></TR>';
  str+='<TR><TD>ÃÖ»óÆú´õ?</TD><TD>IsRootFolder</TD><TD> </TD>';
  str+='<TD>'+paren.IsRootFolder+'</TD></TR>';
  str+='<TR><TD>ºÎ¼ÓÈ­ÀÏ</TD><TD>Files.Count</TD><TD> </TD>';
  str+='<TD>'+paren.Files.Count+'</TD></TR>';
  str+='<TR><TD>È­ÀÏ À̸§</TD><TD>Name</TD><TD>'+file1.Name+'</TD>';
  str+='<TD>'+paren.Name+'</TD></TR>';
  str+='<TR><TD>Æú´õ °æ·Î</TD><TD>ParentFolder</TD><TD>'+file1.ParentFolder+'</TD>';
  str+='<TD>'+paren.ParentFolder+'</TD></TR>';
  str+='<TR><TD>È­ÀÏ °æ·Î</TD><TD>Path</TD><TD>'+file1.Path+'</TD>';
  str+='<TD>'+paren.Path+'</TD></TR>';
  str+='<TR><TD>´ÜÃà À̸§</TD><TD>ShortName</TD><TD>'+file1.ShortName+'</TD>';
  str+='<TD>'+paren.ShortName+'</TD></TR>';
  str+='<TR><TD>´ÜÃà °æ·Î</TD><TD>ShortPath</TD><TD>'+file1.ShortPath+'</TD>';
  str+='<TD>'+paren.ShortPath+'</TD></TR>';
  str+='<TR><TD>È­ÀÏ Å©±â</TD><TD>Size</TD><TD>'+file1.Size+'</TD>';
  str+='<TD>'+paren.Size+'</TD></TR>';
  str+='<TR><TD>ºÎ¼Ó Æú´õ</TD><TD>SubFolders.Count</TD><TD> </TD>';
  str+='<TD>'+paren.SubFolders.Count+'</TD></TR>';
  str+='<TR><TD>È­ÀÏ Á¾·ù</TD><TD>Type</TD><TD>'+file1.Type+'</TD>';
  str+='<TD>'+paren.Type+'</TD></TR>';
  str+='</TABLE>';
  showProperty.innerHTML=str;
}
</SCRIPT>

<DIV class=show title="°á°ú" onClick="ShowProperty('c:\\JsTest\\TestProp.txt')">Ŭ¸¯ÇÏ¿© °á°ú¸¦ º¸¶ó.</DIV>
Ŭ¸¯ÇÏ¿© °á°ú¸¦ º¸¶ó.
<SCRIPT>
function ShowFolderList(drivePath){
  var fso,drvname,enumObj,enum1;
  fso=new ActiveXObject('Scripting.FileSystemObject'); // ÀÚµ¿È­ °³Ã¼¸¦ ¸¸µë.
  folderObj=fso.GetFolder(drivePath);
  str='<TABLE border=1 cellpadding=1 cellspacing=0 align=center width=100%>';
  str+='<TR><TH colspan=9>'+folderObj.Path+'</TH></TR>';
  str+='<TR bgcolor=eeeeee align=center class=small><TD>#</TD><TD>Folder</TD><TD>À̸§</TD>';
  str+='<TD>´ÜÃàÀ̸§</TD><TD>´ÜÃà°æ·Î</TD><TD>ÃÖÃÊ »ý¼ºÀÏ</TD>';
  str+='<TD>ÃÖÁ¾ Á¢¼ÓÀÏ</TD><TD>ÃÖÁ¾ ¼öÁ¤ÀÏ</TD><TD class=small>Atr</TD></TR>';
  fontpct='<COL style=font-size:90%>';
  str+=fontpct+fontpct+fontpct+fontpct+fontpct+fontpct+fontpct+fontpct;
  enum1=new Enumerator(folderObj.SubFolders);

  i=0;
  for (; !enum1.atEnd();enum1.moveNext()){
    folder1=enum1.item();
    str+='<TR><TD>'+i+'</TD><TD>'+folder1+'</TD>';
    created=dateConv(new Date(folder1.DateCreated));
    accessed=dateConv(new Date(folder1.DateLastAccessed));
    modified=dateConv(new Date(folder1.DateLastModified));
    str+='<TD>'+folder1.Name+'</TD><TD>'+folder1.ShortName+'</TD>';
    str+='<TD>'+folder1.ShortPath+'</TD><TD>'+created+'</TD><TD>'+accessed+'</TD>';
    str+='<TD>'+modified+'</TD><TD>'+folder1.Attributes+'</TD></TR>';
    i++;
  }
  str+='</TABLE>';
  openWin(str);
}

function openWin(str){
  newWin=window.open('','pop','top=0,left=0,width=1000,height=580,scrollbars=yes,resizable=yes');
  newWin.document.write('<LINK rel="stylesheet" type="text/css" href="../../public/jscript.css">');
  newWin.document.write(str);
  newWin.document.write('<A href=javascript:self.close()>â´Ý±â</A>');
}

function dateConv(t){
  return(t.getYear()+'/'+(t.getMonth()+1)+'/'+t.getDate()+':'+
    t.getHours()+':'+t.getMinutes()+':'+t.getSeconds());
}
</SCRIPT>

<DIV class=show title="°á°ú" onClick="ShowFolderList('c:\\')">Ŭ¸¯ÇÏ¿© °á°ú¸¦ º¸¶ó.</DIV>
°á°ú Ç¥½Ãâ.
Ŭ¸¯ÇÏ¿© °á°ú¸¦ º¸¶ó.

µå¶óÀÌºê »ó¼¼ Á¶È¸´Â À§ ¿¹Á¦ÀÇ ±â´ÉÇÔ¼ö¸¦ ÀÌ¿ëÇÏ¿´´Ù.

<DIV id=DriveShowarea class=show style="width:460" title="°á°ú">°á°ú Ç¥½Ãâ.</DIV>

<SCRIPT>
function ShowDriveList(){
  var fso,drvname,enumObj,enum1; // º¯¼ö¸¦ ¼±¾ðÇÑ´Ù.
  fso=new ActiveXObject('Scripting.FileSystemObject'); // ÀÚµ¿È­ °³Ã¼¸¦ ¸¸µë.
  enumObj=new Enumerator(fso.Drives); // µå¶óÀ̺꿡 Enumerator¸¦ ¸¸µë.

  str='<TABLE border=0 cellpadding=3 align=center>';
  for (; !enumObj.atEnd();enumObj.moveNext()){ // ¸¶Áö¸· Ç׸ñÀΰ¡¸¦ È®ÀÎÇÏ°í ·çÇÁ ¹®Àå Á¾·á

    enum1=enumObj.item();
    detail='';
    str=str+'<TR><TD>'+enum1.DriveLetter+'</TD>'; // µå¶óÀ̺ê Ç׸ñº° µå¶óÀÌºê ±ÛÀÚ Ãâ·Â
    if (enum1.DriveType==3) drvname=enum1.ShareName ; // µå¶óÀÌºê °øÀ¯À̸§  ¾ò¾î ¹®ÀÚ¿­¿¡ Ãß°¡

    else if (enum1.IsReady){
      drvname=enum1.VolumeName; // µå¶óÀ̺갡 Áغñ »óÅÂÀÎÁö È®ÀÎÇÏ°í, º¼·ý À̸§À» °¡Á®¿È.
      detail='<A href=javascript:ShowFolderList(\"'+enum1.RootFolder+'\\")>»ó¼¼ º¸±â Ŭ¸¯</A></SPAN>';
    }
    else drvname='[µå¶óÀ̺갡 ÁغñµÇÁö ¾Ê¾Ò½À´Ï´Ù.]';
    str+='<TD>'+drvname+'</TD><TD>'+detail+'</TD></TR>';
  }
  str+='</TABLE>';
  DriveShowarea.innerHTML=str; // µå¶óÀÌºê ¸ñ·ÏÀ» Ãâ·Â.
} // ±â´ÉÇÔ¼ö Á¾·á
</SCRIPT>

<DIV class=show title="°á°ú" onClick="ShowDriveList()">Ŭ¸¯ÇÏ¿© °á°ú¸¦ º¸¶ó.</DIV>
<SCRIPT>