Scripting Runtime Library(FileSystemObject)

Æú´õÀÇ ¸ðµç ¼Ó¼º¿¡ ¾×¼¼½ºÇÒ ¼ö ÀÖ´Ù.

Script [propVal=]..propName;
..methodName(parameters);
HTML ¾ø´Ù.
Àμö
folderObj : (ÆÄÀϸí)

È£ÃâµÈ Folder °³Ã¼ÀÌ´Ù. ActiveXObject¸¦ È°¼ºÈ­½ÃÅ°°í GetFolder ¸Þ¼­µåµîÀ¸·Î Folder °³Ã¼¸¦ È£Ãâ ÇÑ´Ù.

propertyName : (¼Ó¼º¸í)

propertyNameÀº ¾Æ·¡ ¼³¸íµÈ ¼Ó¼ºµé Áß ÇϳªÀÌ´Ù.

Folder °³Ã¼ È£Ãâ ¹æ½Ä
  1. GetFolder ¸Þ¼­µå
    folderObj=fsoName.GetFolder(folderPath)
  2. Folders Ä÷º¼Ç¿¡¼­
    folderCol=fsoName.GetFolders(folderPath).SubFolders
    1. Ç׸ñ Key·Î Item È£Ãâ
      folderObj=folderCol.Item(keyVal)
    2. Add(Folder) ¸Þ¼­µå·Î Folder »ý¼º
      folderObj=folderCol.Add(newFolder)
    3. Enumerator °³Ã¼¸¦ ¸¸µé¾î
      folderObj=enumObj.item()
  3. Æú´õ »ý¼º
    1. CreateFolder ¸Þ¼­µå
      folderObj=fsoName.CreateFolder(folderPath)


Folder °³Ã¼¸¦ °¡Á®¿À°í ¼Ó¼ºÀ» ¹ÝȯÇÏ´Â ¿¹Á¦

°á°ú Ç¥½Ãâ
JScript Folder °³Ã¼ ¿¹Á¦
<SCRIPT language=JScript>
function FolderTest(folderPath) {
  var fso,folderObj,str;
  fso=new ActiveXObject('Scripting.FileSystemObject')
  if (!fso.FolderExists(folderPath)){
    fso.CreateFolder(folderPath);
    str+='Æú´õ°¡ ¾ø¾î '+folderPath+' Æú´õ¸¦ »ý¼ºÇÏ¿´´Ù.<BR>';
  }
  folderObj=fso.GetFolder(folderPath);
  str='"'+folderObj+'"ÀÇ »ý¼ºÀÏÀº '+.DateCreated ;
  return(str);
}
</SCRIPT>

<DIV id=showjs class=show alt="°á°ú">°á°ú Ç¥½Ãâ</DIV>
<DIV class=show onClick="id=showjs.innerHTML=FolderTest('C:\\JsTest')">
  <SPAN class=ie>JScript</SPAN> <SPAN class=object>Folder</SPAN> °³Ã¼ ¿¹Á¦</DIV>
°á°ú Ç¥½Ãâ
VBScript Folder °³Ã¼ ¿¹Á¦
<SCRIPT language=VBScript>
Function FolderTestvb(folderPath)
  Dim fso,folderObj
  Set fso=CreateObject("Scripting.FileSystemObject")
  If Not fso.FolderExists(folderPath) Then
    fso.CreateFolder(folderPath)
    str=str&"Æú´õ°¡ ¾ø¾î "&folderPath&" Æú´õ¸¦ »ý¼ºÇÏ¿´´Ù.<BR>"
  End If
  Set folderObj=fso.GetFolder(folderPath)
  str="'"&folderObj&"'ÀÇ »ý¼ºÀÏÀº "&.DateCreated
  FolderTestvb=str
End Function
</SCRIPT>

<DIV id=showvb class=show alt="°á°ú">°á°ú Ç¥½Ãâ</DIV>
<DIV class=show onClick="showvb.innerHTML=FolderTestvb('C:\\JsTest')">
  <SPAN class=ie>VBScript</SPAN> <SPAN class=object>Folder</SPAN> °³Ã¼ ¿¹Á¦</DIV>

¿¹Á¦Attributes(°³Ã¼) ¼Ó¼º IE4 -
¢¡ Æú´õÀÇ ¼Ó¼º ÀμöÀÇ °¹¼ö¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù.
¹®¹ý: .Attributes[=sVal]
¿¹Á¦DateCreated ¼Ó¼º IE4 -
¢¡ ÁöÁ¤ÇÑ Æú´õ°¡ ¸¸µé¾îÁø ³¯Â¥¿Í ½Ã°£À» ¹ÝȯÇÑ´Ù. Àбâ Àü¿ëÀÌ´Ù.
¹®¹ý: [dVal=].DateCreated
¿¹Á¦DateLastAccessed ¼Ó¼º IE4 -
¢¡ ÁöÁ¤ÇÑ Æú´õ¿¡ ¸¶Áö¸·À¸·Î ¾×¼¼½ºÇÑ ³¯Â¥¿Í ½Ã°£À» ¹ÝȯÇÑ´Ù. Àбâ Àü¿ëÀÌ´Ù.
¹®¹ý: [dVal=].DateLastAccessed
¿¹Á¦DateLastModified ¼Ó¼º IE4 -
¢¡ ÁöÁ¤ÇÑ Æú´õ¸¦ ¸¶Áö¸·À¸·Î ¼öÁ¤ÇÑ ³¯Â¥¿Í ½Ã°£À» ¹ÝȯÇÑ´Ù. Àбâ Àü¿ëÀÌ´Ù.
¹®¹ý: [dVal=].DateLastModified
¿¹Á¦Drive(°³Ã¼) ¼Ó¼º IE4 -
¢¡ ÁöÁ¤ÇÑ Æú´õ°¡ ÀÖ´Â µå¶óÀ̺êÀÇ µå¶óÀÌºê ¹®ÀÚ¸¦ ¹ÝȯÇÑ´Ù. Àбâ Àü¿ëÀÌ´Ù.
¹®¹ý: [sVal=].Drive
¿¹Á¦Files(Ä÷º¼Ç) ¼Ó¼º IE4 -
¢¡ ÁöÁ¤ÇÑ Æú´õ¿¡ Æ÷ÇԵǾî ÀÖ´Â ¸ðµç ÆÄÀÏ·Î ±¸¼ºµÈ File Ä÷º¼ÇÀ» ¹ÝȯÇÑ´Ù.
¹®¹ý: [cVal=].Files
¿¹Á¦IsRootFolder ¼Ó¼º IE4 -
¢¡ ÁöÁ¤µÈ Æú´õ°¡ ·çÆ® Æú´õÀ̸é true¸¦, ¾Æ´Ï¸é false¸¦ ¹ÝȯÇÑ´Ù.
¹®¹ý: [bVal=].IsRootFolder
¿¹Á¦name ¼Ó¼º IE4 -
¢¡ ÁöÁ¤ÇÑ Æú´õÀÇ À̸§À» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. Àбâ/¾²±â°¡ °¡´ÉÇÏ´Ù.
¹®¹ý: .name[=sVal]
¿¹Á¦ParentFolder ¼Ó¼º IE4 -
¢¡ ÁöÁ¤ÇÑ Æú´õÀÇ »óÀ§ Æú´õ¿¡ ÇØ´çÇÏ´Â Æú´õ °³Ã¼¸¦ ¹ÝȯÇÑ´Ù. Àбâ Àü¿ëÀÌ´Ù.
¹®¹ý: [oVal=].ParentFolder
¿¹Á¦Path ¼Ó¼º IE4 -
¢¡ ÁöÁ¤ÇÑ Æú´õÀÇ °æ·Î¸¦ ¹ÝȯÇÑ´Ù.
¹®¹ý: [sVal=].Path
¿¹Á¦ShortName ¼Ó¼º IE4 -
¢¡ ¿¹Àü ¸í¸í ±ÔÄ¢À» µû¸£´Â ÇÁ·Î±×·¥¿¡¼­ »ç¿ëµÇ´Â ªÀº À̸§À» ¹ÝȯÇÑ´Ù.
¹®¹ý: [sVal=].ShortName
¿¹Á¦ShortPath ¼Ó¼º IE4 -
¢¡ ¿¹Àü ¸í¸í ±ÔÄ¢À» µû¸£´Â ÇÁ·Î±×·¥¿¡¼­ »ç¿ëµÇ´Â ªÀº °æ·Î¸¦ ¹ÝȯÇÑ´Ù.
¹®¹ý: [sVal=].ShortPath
¿¹Á¦Size ¼Ó¼º IE4 -
¢¡ ÁöÁ¤ÇÑ Æú´õ¿¡ µé¾îÀÖ´Â ¸ðµç ÆÄÀÏ°ú ÇÏÀ§ Æú´õÀÇ Å©±â¸¦ ¹ÙÀÌÆ® ´ÜÀ§·Î ¹ÝȯÇÑ´Ù.
¹®¹ý: [iVal=].Size
¿¹Á¦SubFolders ¼Ó¼º IE4 -
¢¡ ÁöÁ¤ÇÑ Æú´õ¿¡ Æ÷ÇԵǾî ÀÖ´Â ¸ðµç Æú´õ·Î ±¸¼ºµÈ Folders Ä÷º¼ÇÀ» ¹ÝȯÇÑ´Ù.
¹®¹ý: [cVal=].SubFolders
¿¹Á¦Type ¼Ó¼º IE4 -
¢¡ Æú´õÀÇ Çü½Ä¿¡ °üÇÑ Á¤º¸¸¦ ¹ÝȯÇÑ´Ù.
¹®¹ý: [sVal=].Type

¿¹Á¦Copy ¸Þ¼­µå IE4 -
¢¡ ÁöÁ¤ÇÑ Æú´õ¸¦ ±âÁ¸ À§Ä¡¿¡¼­ ´Ù¸¥ À§Ä¡·Î º¹»çÇÑ´Ù.
¹®¹ý: .Copy(destination,overwrite)
¿¹Á¦Delete ¸Þ¼­µå IE4 -
¢¡ ÁöÁ¤ÇÑ Æú´õ¸¦ »èÁ¦ÇÑ´Ù.
¹®¹ý: .Delete(force)
Move ¸Þ¼­µå IE4 -
¢¡ ÁöÁ¤ÇÑ Æú´õ¸¦ ±âÁ¸ À§Ä¡¿¡¼­ ´Ù¸¥ À§Ä¡·Î ¿Å±ä´Ù.
¹®¹ý: .Move(destination)