Scripting Runtime Library(FileSystemObject)
ƯÁ¤ µð½ºÅ© µå¶óÀ̺곪 ³×Æ®¿öÅ© °øÀ¯ ¼Ó¼º¿¡ ¾×¼¼½ºÇÒ ¼ö ÀÖ´Ù.
|
Script |
[propVal=]..propName;
..methodName(parameters); |
HTML |
¾ø´Ù. |
- Àμö
-
- driveObj : (ÆÄÀϸí)
Çʼö ¿ä¼Ò·Î È£ÃâµÈ Drive °³Ã¼ÀÌ´Ù.
ActiveXObject¸¦ È°¼ºÈ½ÃÅ°°í GetDrive ¸Þ¼µåµîÀ¸·Î ½Ã½ºÅÛÀÇ Drive °³Ã¼¸¦ È£Ãâ ÇÑ´Ù.
- propertyName : (¼Ó¼º¸í)
-
propertyNameÀº ¾Æ·¡ ¼³¸íµÈ ¼Ó¼ºµé Áß ÇϳªÀÌ´Ù.
- Drive °³Ã¼ È£Ãâ ¹æ½Ä
-
- GetDrive ¸Þ¼µå
driveObj=fsoName.GetDrive(drivePath)
- Drives Ä÷º¼Ç¿¡¼
driveCol=fsoName.Drives
- Ç׸ñ Key·Î Item È£Ãâ
driveObj=driveCol.Item(keyVal)
- Enumerator °³Ã¼¸¦ ¸¸µé¾î
driveObj=enumObj.item()
Drive °³Ã¼¸¦ »ç¿ëÇÏ¿© µå¶óÀÌºê ¼Ó¼º¿¡ ¾×¼¼½ºÇÏ´Â ¿¹Á¦
°á°ú Ç¥½Ãâ
JScript Drive °³Ã¼ ¿¹Á¦
<SCRIPT language=JScript>
function DriveTest(drivePath){
var fso,driveObj,str;
fso=new ActiveXObject('Scripting.FileSystemObject')
driveObj=fso.GetDrive(fso.GetDriveName(drivePath));
str='µå¶óÀ̺ê '+drivePath+' - '+driveObj.VolumeName +'<BR>';
str+='»ç¿ë °¡´ÉÇÑ °ø°£: '+driveObj.FreeSpace /1024+'KB';
return(str);
}
</SCRIPT>
<DIV id=showjs class=show alt="°á°ú">°á°ú Ç¥½Ãâ</DIV>
<DIV class=show onClick="id=showjs.innerHTML=DriveTest('C:\\')">
<SPAN class=ie>JScript</SPAN> <SPAN class=object>Drive</SPAN> °³Ã¼ ¿¹Á¦</DIV>
°á°ú Ç¥½Ãâ
VBScript Drive °³Ã¼ ¿¹Á¦
<SCRIPT language=VBScript>
Function DriveTestvb(drivePath)
Dim fso,driveObj,str
Set fso=CreateObject("Scripting.FileSystemObject")
Set driveObj=fso.GetDrive(fso.GetDriveName(drivePath))
str="µå¶óÀ̺ê " & UCase(drivePath) & " - " & driveObj.VolumeName & "<BR>"
str=str & "»ç¿ë °¡´ÉÇÑ °ø°£: " & FormatNumber(driveObj.FreeSpace /1024,0) & " KB"
DriveTestvb=str
End Function
</SCRIPT>
<DIV id=showvb class=show alt="°á°ú">°á°ú Ç¥½Ãâ</DIV>
<DIV class=show onClick="showvb.innerHTML=DriveTestvb('C:\\')">
<SPAN class=ie>VBScript</SPAN> <SPAN class=object>Drive</SPAN> °³Ã¼ ¿¹Á¦</DIV>
AvailableSpace ¼Ó¼º
IE4 -
¢¡ ÁöÁ¤ÇÑ µå¶óÀ̺곪 ³×Æ®¿öÅ© °øÀ¯ ¿µ¿ª¿¡¼ »ç¿ëÀÚ°¡ »ç¿ëÇÒ ¼ö ÀÖ´Â °ø°£ÀÇ Å©±â¸¦ ¹ÝȯÇÑ´Ù.
¹®¹ý: [iVal=].AvailableSpace
DriveLetter ¼Ó¼º
IE4 -
¢¡ ½ÇÁ¦ ·ÎÄà µå¶óÀ̺êÀ̳ª ³×Æ®¿öÅ© °øÀ¯ ¿µ¿ªÀÇ µå¶óÀÌºê ¹®ÀÚ¸¦ ¹ÝȯÇÑ´Ù. Àбâ Àü¿ëÀÌ´Ù.
¹®¹ý: [charVal=].DriveLetter
DriveType ¼Ó¼º
IE4 -
¢¡ ÁöÁ¤ÇÑ µå¶óÀ̺êÀÇ Çü½ÄÀ» ³ªÅ¸³»´Â °ªÀ» ¹ÝȯÇÑ´Ù.
¹®¹ý: [sVal=].DriveType
FileSystem ¼Ó¼º
IE4 -
¢¡ ÁöÁ¤ÇÑ µå¶óÀ̺꿡¼ »ç¿ëÇÏ´Â ÆÄÀÏ ½Ã½ºÅÛÀÇ Çü½ÄÀ» ¹ÝȯÇÑ´Ù.
¹®¹ý: [sVal=].FileSystem
FreeSpace ¼Ó¼º
IE4 -
¢¡ ÁöÁ¤ÇÑ µå¶óÀ̺곪 ³×Æ®¿öÅ© °øÀ¯ ¿µ¿ª¿¡¼ »ç¿ëÇÒ ¼ö ÀÖ´Â »ç¿ë °¡´ÉÇÑ °ø°£ÀÇ Å©±â¸¦ ¹ÝȯÇÑ´Ù. Àбâ Àü¿ëÀÌ´Ù.
¹®¹ý: [iVal=].FreeSpace
IsReady ¼Ó¼º
IE4 -
¢¡ ÁöÁ¤ÇÑ µå¶óÀ̺갡 ÁغñµÇ¸é true¸¦, ¾Æ´Ï¸é false¸¦ ¹ÝȯÇÑ´Ù.
¹®¹ý: [bVal=].IsReady
Path ¼Ó¼º
IE4 -
¢¡ ÁöÁ¤ÇÑ µå¶óÀ̺êÀÇ °æ·Î¸¦ ¹ÝȯÇÑ´Ù.
¹®¹ý: [sVal=].Path
RootFolder ¼Ó¼º
IE4 -
¢¡ ÁöÁ¤ÇÑ µå¶óÀ̺êÀÇ ·çÆ® Æú´õ¸¦ ³ªÅ¸³»´Â
Folder °³Ã¼¸¦ ¹ÝȯÇÑ´Ù. Àбâ Àü¿ëÀÌ´Ù.
¹®¹ý: [sVal=].RootFolder
SerialNumber ¼Ó¼º
IE4 -
¢¡ µð½ºÅ© º¼·ýÀ» °íÀ¯ÇÏ°Ô ½Äº°ÇÏ´Â µ¥ »ç¿ëµÇ´Â ½ÊÁø¼öÀÇ ÀÏ·Ã ¹øÈ£¸¦ ¹ÝȯÇÑ´Ù.
¹®¹ý: [sVal=].SerialNumber
ShareName ¼Ó¼º
IE4 -
¢¡ ÁöÁ¤ÇÑ µå¶óÀ̺êÀÇ ³×Æ®¿öÅ© °øÀ¯ À̸§À» ¹ÝȯÇÑ´Ù.
¹®¹ý: [sVal=].ShareName
TotalSize ¼Ó¼º
IE4 -
¢¡ µå¶óÀ̺곪 ³×Æ®¿öÅ© °øÀ¯ ¿µ¿ªÀÇ Àüü °ø°£À» ¹ÙÀÌÆ® ´ÜÀ§·Î ¹ÝȯÇÑ´Ù.
¹®¹ý: [iVal=].TotalSize
VolumeName ¼Ó¼º
IE4 -
¢¡ ÁöÁ¤ÇÑ µå¶óÀ̺êÀÇ º¼·ý À̸§À» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. Àбâ/¾²±â°¡ °¡´ÉÇÏ´Ù.
¹®¹ý: [sVal=].VolumeName
Drive °³Ã¼¿¡´Â ¸Þ¼µå°¡ ¾ø´Ù.