Scripting Runtime Library(FileSystemObject)
È®Àå¸íÀÌ ¾ø´Â °æ·Î¿¡¼ ¸¶Áö¸· ±¸¼º ¿ä¼ÒÀÇ ±âº» À̸§À» Æ÷ÇÔÇÑ ¹®ÀÚ¿À» ¹ÝȯÇÑ´Ù.
¹Ýȯ°ª sValÀº ¹ÝȯµÇ´Â ±¸¼º ¿ä¼ÒÀÇ ±âº» À̸§À» Æ÷ÇÔÇÑ ¹®ÀÚ¿ÀÌ´Ù.
objPath Àμö¿Í ÀÏÄ¡ÇÏ´Â ±¸¼º ¿ä¼Ò°¡ ¾øÀ¸¸é GetBaseName ¸Þ¼µå´Â ºó ¹®ÀÚ¿("")À» ¹ÝȯÇÑ´Ù.
<SCRIPT language=JScript> function GetBaseNameTest(filePath){ var fso,str=''; fso=new ActiveXObject('Scripting.FileSystemObject'); str+='filePath='+filePath+'<BR>'; str+='fso.GetBaseName(filePath)="'+fso.GetBaseName(filePath)+'"'; return(str); } </SCRIPT> <DIV id=showGetBase class=show alt="°á°ú">°á°ú Ç¥½Ãâ</DIV> <DIV class=show onClick="showGetBase.innerHTML=GetBaseNameTest(self.location)">ÇöÀç Æú´õÀÇ GetBaseName º¸±â ¿¹Á¦</DIV>
<SCRIPT language=VBScript> Function GetBaseNameTestvb(filePath) Dim fso,str Set fso=CreateObject("Scripting.FileSystemObject") str=str&"filePath="&filePath&"<BR>" str=str&"fso.GetBaseName(filePath)='"&fso.GetBaseName(filePath)&"'" GetBaseNameTestvb=str End Function </SCRIPT> <DIV id=showvb class=show alt="°á°ú">°á°ú Ç¥½Ãâ</DIV> <DIV class=show onClick="showvb.innerHTML=GetBaseNameTestvb(self.location)"> <SPAN class=ie>VBScript</SPAN> ÇöÀç Æú´õÀÇ <SPAN class=method>GetBaseName</SPAN> º¸±â ¿¹Á¦</DIV>