Scripting Runtime Library(FileSystemObject)
Æú´õÀÇ ¸ðµç ¼Ó¼º¿¡ ¾×¼¼½ºÇÒ ¼ö ÀÖ´Ù.
|
Script |
[propVal=]..propName;
..methodName(parameters); |
HTML |
¾ø´Ù. |
- Àμö
-
- folderObj : (ÆÄÀϸí)
È£ÃâµÈ Folder °³Ã¼ÀÌ´Ù.
ActiveXObject¸¦ È°¼ºÈ½ÃÅ°°í GetFolder ¸Þ¼µåµîÀ¸·Î Folder °³Ã¼¸¦ È£Ãâ ÇÑ´Ù.
- propertyName : (¼Ó¼º¸í)
-
propertyNameÀº ¾Æ·¡ ¼³¸íµÈ ¼Ó¼ºµé Áß ÇϳªÀÌ´Ù.
- Folder °³Ã¼ È£Ãâ ¹æ½Ä
-
- GetFolder ¸Þ¼µå
folderObj=fsoName.GetFolder(folderPath)
- Folders Ä÷º¼Ç¿¡¼
folderCol=fsoName.GetFolders(folderPath).SubFolders
- Ç׸ñ Key·Î Item È£Ãâ
folderObj=folderCol.Item(keyVal)
- Add(Folder) ¸Þ¼µå·Î Folder »ý¼º
folderObj=folderCol.Add(newFolder)
- Enumerator °³Ã¼¸¦ ¸¸µé¾î
folderObj=enumObj.item()
- Æú´õ »ý¼º
- 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)