Scripting Runtime Library(FileSystemObject)
ÁöÁ¤ÇÑ Æú´õ¿Í Æú´õÀÇ ³»¿ëÀ» »èÁ¦ÇÑ´Ù.
DeleteFolder ¸Þ¼µå´Â ³»¿ëÀÌ ÀÖ´Â Æú´õ¿Í ³»¿ëÀÌ ¾ø´Â Æú´õ¸¦ ±¸º°ÇÏÁö ¾Ê´Â´Ù.
ÁöÁ¤ÇÑ Æú´õ´Â ³»¿ëÀÌ ÀÖµç ¾øµç »ó°ü¾øÀÌ »èÁ¦µÈ´Ù.
ÁöÁ¤ÇÑ Æú´õ¿Í ÀÏÄ¡ÇÏ´Â Æú´õ°¡ ¾øÀ¸¸é ¿À·ù°¡ ¹ß»ýÇÑ´Ù.
DeleteFolder ¸Þ¼µå´Â ù ¹ø° ¿À·ù°¡ ¹ß»ýÇÏ¸é ±× »óÅ·ΠÁßÁöÇÑ´Ù.
À̶§ ¿À·ù°¡ ¹ß»ýÇϱâ Àü¿¡ º¯°æµÈ »çÇ×Àº µÇµ¹¸± ¼ö ¾ø´Ù.
Delete ¸Þ¼µå·Îµµ »èÁ¦ ÇÒ ¼ö ÀÖ´Ù.
<SCRIPT language=JScript> function DeleteFolderTest(folderPath){ var fso,fileObj,str=''; fso=new ActiveXObject('Scripting.FileSystemObject'); if (fso.FolderExists(folderPath)) fso.DeleteFolder(folderPath); fso.CreateFolder(folderPath); str+='Æú´õ "'+folderPath+'"°¡ »ý¼ºµÇ¾ú´Ù.<BR>'; fso.DeleteFolder(folderPath); str+='Æú´õ "'+folderPath+'"°¡ »èÁ¦µÇ¾ú´Ù.'; return(str); } </SCRIPT> <DIV id=showjs class=show alt="°á°ú">°á°ú Ç¥½Ãâ</DIV> <DIV class=show onClick="showjs.innerHTML=DeleteFolderTest('C:\\JsTest\\DeletFolder')"> <SPAN class=ie>JScript</SPAN> <SPAN class=method>DeleteFolder</SPAN> ¸Þ¼µå ¿¹Á¦</DIV>
<SCRIPT language=VBScript> Function DeleteFolderTestvb(folderPath) Dim fso Set fso=CreateObject("Scripting.FileSystemObject") If fso.FolderExists(folderPath) Then fso.DeleteFolder(folderPath) End If fso.CreateFolder(folderPath) str="Æú´õ '"&folderPath&"'°¡ »ý¼ºµÇ¾ú´Ù.<BR>" fso.DeleteFolder(folderPath) str=str&"Æú´õ '"&folderPath&"'°¡ »èÁ¦µÇ¾ú´Ù.<BR>" DeleteFolderTestvb=str End Function </SCRIPT> <DIV id=showvb class=show alt="°á°ú">°á°ú Ç¥½Ãâ</DIV> <DIV class=show onClick="showvb.innerHTML=DeleteTestvb('C:\\JsTest\\DeletFolder')"> <SPAN class=ie>VBScript</SPAN> <SPAN class=method>Delete</SPAN> ¸Þ¼µå ¿¹Á¦</DIV>