Scripting Runtime Library
<SCRIPT>
var fso,str,folderPath,fileVar,folderOrg,fileOrg,folderTgt,fileTgt,folder,file,folders,files='';
var fileexist,folderexist,folderNumb,fileNumb,filewild=0;
var parent='c:\\JsTest';
var ForReading=1,ForWriting=2;

function initialize(){
  fso=new ActiveXObject('Scripting.FileSystemObject');
}

function checkFolder(folder){
  if (!fso) initialize();
  folderexist=false;
  if(fso.FolderExists(folder)){
    folderexist=true;
    folderObj=fso.GetFolder(folder)
    folders=folderObj.SubFolders;
    folderNumb=folders.Count;
    files=folderObj.Files;
    fileNumb=files.Count;
  }
}

function checkFile(file){
  if (!fso) initialize();
  fileexist=false;
  if(fso.FileExists(file)) fileexist=true;
}

function createFolder(folder){
  if (!fso) initialize();
  checkFolder(folder);
  if (folderexist){
    str+='Folder "'+folder+'"°¡ Á¸ÀçÇÑ´Ù.<BR>';
    str+='Folder "'+folder+'"¸¦ »ý¼ºÇÒ ¼ö ¾ø´Ù.<BR>';
    return str;
  } else {
    fso.CreateFolder(folder);
    checkFolder(folder);
    str+='"<B>'+folder+'</B>" Folder°¡ »ý¼ºµÇ¾ú´Ù.<BR>';
  }
}

function addFolder(folder,newfolder){
  if (!fso) initialize();
  createFolder(folder);
  hCol=folders;
  if (newfolder=='') newfolder='newFolder';
  newfolderPath=folder+'\\'+newfolder;
  checkFolder(newfolderPath);
  if (folderexist){
    str+='Folder "'+newfolderPath+'"°¡ Á¸ÀçÇÑ´Ù.<BR>';
    str+='Folder "'+newfolder+'"¸¦ Ãß°¡ÇÒ ¼ö ¾ø´Ù.<BR>';
    return str;
  } else {
    hCol.Add(newfolder);
    str+='"<B>'+newfolderPath+'</B>" Æú´õ°¡ Ãß°¡µÇ¾ú´Ù.<BR>';
    checkFolder(newfolderPath);
  }
}

function deleteFolder(folder){
  if (!fso) initialize();
  checkFolder(folder);
  if (!folderexist){
    str+='"'+folder+'" Folder°¡ Á¸ÀçÇÏÁö ¾Ê´Â´Ù.<BR>';
    str+='"'+folder+'" Folder°¡ »èÁ¦ÇÒ ¼ö ¾ø´Ù.<BR>';
    return str;
  } else {
    fso.DeleteFolder(folder);
    checkFolder(folder);
    str+='"<B>'+folder+'</B>" Folder°¡ »èÁ¦µÇ¾ú´Ù.<BR>';
  }
}

function createFile(file){
  if (!fso) initialize();
  separateFolder(file);
  checkFolder(folder);
  if (!folderexist){
    str+='"'+folder+'" Folder°¡ Á¸ÀçÇÏÁö ¾Ê´Â´Ù.<BR>';
    str+='"'+file+'" FileÀ» »ý¼ºÇÒ ¼ö ¾ø´Ù.<BR>';
    return str;
  }
  checkFile(file);
  if (fileexist){
    str+='"'+file+'" FileÀÌ Á¸ÀçÇÑ´Ù.<BR>';
    str+='"'+file+'" FileÀ» »ý¼ºÇÒ ¼ö ¾ø´Ù.<BR>';
    return str;
  }
  fileObj=fso.OpenTextFile(file,ForWriting,true);
  fileObj.WriteLine('Javascript ¿¹Á¦¸¦ À§ÇØ »ý¼ºµÈ È­ÀÏÀÌ´Ù.');
  fileObj.Write(file+' FileÀº '+folder+' Folder¿¡ »ý¼ºµÇ¾ú´Ù.');
  fileObj.Close();
  checkFile(file);
  str+='"<B>'+file+'</B>" FileÀÌ »ý¼ºµÇ¾ú´Ù.<BR>';
  return str;
}

function deleteFile(file){
  separateFolder(file);
  checkFolder(folder);
  if (!folderexist){
    str+='"'+folder+'" Folder°¡ Á¸ÀçÇÏÁö ¾Ê´Â´Ù.<BR>';
    str+='"'+file+'" FileÀ» »èÁ¦ÇÒ ¼ö ¾ø´Ù.<BR>';
    return str;
  }
  checkFile(file);
  if (!fileexist){
    str+='"'+file+'" FileÀÌ Á¸ÀçÇÏÁö ¾Ê´Â´Ù.<BR>';
    str+='"'+file+'" FileÀ» »èÁ¦ÇÒ ¼ö ¾ø´Ù.<BR>';
    return str;
  }
  fso.DeleteFile(file,false);
  str+='"<B>'+file+ '</B>" File »èÁ¦°¡ ¿Ï·áµÇ¾ú´Ù.<BR>';
  return str;
}

function copyFolder(folderOrg,folderTgt){
  checkFolder(parent);
  if (!folderexist){
    str+='"'+folder+'" Folder°¡ Á¸ÀçÇÏÁö ¾Ê´Â´Ù.<BR>';
    str+='"'+folderOrg+'" Folder¸¦ º¹»çÇÒ ¼ö ¾ø´Ù.<BR>';
    return str;
  }
  checkFolder(folderOrg);
  if (!folderexist){
    str+='"'+folderOrg+'" Folder°¡ Á¸ÀçÇÏÁö ¾Ê´Â´Ù.<BR>';
    str+='"'+folderOrg+'" Folder¸¦ º¹»çÇÒ ¼ö ¾ø´Ù.<BR>';
    return str;
  }
  checkFolder(folderTgt);
  if (folderexist){
    str+='"'+folderTgt+'" Folder°¡ Á¸ÀçÇÑ´Ù.<BR>';
    str+='"'+folderOrg+'" Folder¸¦ º¹»çÇÒ ¼ö ¾ø´Ù.<BR>';
    return str;
  }

  fso.CopyFolder(folderOrg,folderTgt,true);
  str+='"'+folderOrg+'" Folder°¡ "<B>'+folderTgt+'</B>" Folder·Î º¹»çµÇ¾ú´Ù.<BR>';
  str+='ºÎ¼Ó File "'+fileNumb+'"°³°¡ µ¿½Ã¿¡ º¹»çµÇ¾ú´Ù.<BR>';

  return str;
}

function copyFile(fileOrg,folderTgt){
  checkFolder(parent);
  if (!folderexist){
    str+='"'+folder+'" Folder°¡ Á¸ÀçÇÏÁö ¾Ê´Â´Ù.<BR>';
    str+='"'+fileOrg+'" FileÀ» º¹»çÇÒ ¼ö ¾ø´Ù.<BR>';
    return str;
  }
  separateFolder(fileOrg);
  checkFolder(folder);
  if (!folderexist){
    str+='"'+folder+'" Folder°¡ Á¸ÀçÇÏÁö ¾Ê´Â´Ù.<BR>';
    str+='"'+fileOrg+'" FileÀ» º¹»çÇÒ ¼ö ¾ø´Ù.<BR>';
    return str;
  }
  if (!fileNumb){
    str+='"'+folder+'"¿¡ FileÀÌ ¾ø´Ù.<BR>';
    str+='"'+fileOrg+'" FileÀ» º¹»çÇÒ ¼ö ¾ø´Ù.<BR>';
    return str;
  } else {
    str+='"'+folder+'"¿¡ File '+fileNumb+' °³°¡ ÀÖ´Ù.<BR>';
  }
  checkFolder(folderTgt);
  if (!folderexist){
    str+='"'+folder+'" Folder°¡ Á¸ÀçÇÏÁö ¾Ê´Â´Ù.<BR>';
    str+='"'+fileOrg+'" FileÀ» º¹»çÇÒ ¼ö ¾ø´Ù.<BR>';
    return str;
  }
  fso.CopyFile(fileOrg,folderTgt,true);
  str+='"'+fileOrg+'" FileÀÌ "<B>'+folderTgt+'</B>" Folder·Î º¹»çµÇ¾ú´Ù.<BR>';
  if (filewild) str+='ºÎ¼Ó File "'+fileNumb+'"°³°¡ µ¿½Ã¿¡ º¹»çµÇ¾ú´Ù.<BR>';

  return str;
}

function moveFolder(folderOrg,folderTgt){
  checkFolder(parent);
  if (!folderexist){
    str+='"'+folder+'" Folder°¡ Á¸ÀçÇÏÁö ¾Ê´Â´Ù.<BR>';
    str+='"'+folderOrg+'" Folder¸¦ À̵¿ÇÒ ¼ö ¾ø´Ù.<BR>';
    return str;
  }
  checkFolder(folderOrg);
  if (!folderexist){
    str+='"'+folderOrg+'" Folder°¡ Á¸ÀçÇÏÁö ¾Ê´Â´Ù.<BR>';
    str+='"'+folderOrg+'" Folder¸¦ À̵¿ÇÒ ¼ö ¾ø´Ù.<BR>';
    return str;
  }
  checkFolder(folderTgt);
  if (folderexist){
    str+='"'+folderTgt+'" Folder°¡ Á¸ÀçÇÑ´Ù.<BR>';
    str+='"'+folderOrg+'" Folder¸¦ À̵¿ÇÒ ¼ö ¾ø´Ù.<BR>';
    return str;
  }

  fso.MoveFolder(folderOrg,folderTgt);
  str+='"'+folderOrg+'" Folder°¡ "<B>'+folderTgt+'</B>" Folder·Î À̵¿µÇ¾ú´Ù.<BR>';
  str+='ºÎ¼Ó File "'+fileNumb+'"°³°¡ µ¿½Ã¿¡ À̵¿µÇ¾ú´Ù.<BR>';
  return str;
}

function moveFile(fileOrg,folderTgt){
  checkFolder(parent);
  if (!folderexist){
    str+='"'+folder+'" Folder°¡ Á¸ÀçÇÏÁö ¾Ê´Â´Ù.<BR>';
    str+='"'+fileOrg+'" FileÀ» À̵¿ÇÒ ¼ö ¾ø´Ù.<BR>';
    return str;
  }
  separateFolder(fileOrg);
  checkFolder(folder);
  folderOrg=folder;
  if (!folderexist){
    str+='"'+folder+'" Folder°¡ Á¸ÀçÇÏÁö ¾Ê´Â´Ù.<BR>';
    str+='"'+fileOrg+'" FileÀ» À̵¿ÇÒ ¼ö ¾ø´Ù.<BR>';
    return str;
  }
  checkFolder(folderTgt);
  if (!folderexist){
    str+='"'+folderTgt+'" Folder°¡ Á¸ÀçÇÏÁö ¾Ê´Â´Ù.<BR>';
    str+='"'+fileOrg+'" FileÀ» À̵¿ÇÒ ¼ö ¾ø´Ù.<BR>';
    return str;
  }
  checkFile(fileOrg);
  if (!fileexist){
    str+='"'+fileOrg+'" FileÀÌ Á¸ÀçÇÏÁö ¾Ê´Â´Ù.<BR>';
    str+='"'+fileOrg+'" FileÀ» À̵¿ÇÒ ¼ö ¾ø´Ù.<BR>';
    return str;
  }
  checkFile(folderTgt+file);
  if (fileexist){
    str+='"'+folderTgt+file+'" FileÀÌ Á¸ÀçÇÑ´Ù.<BR>';
    str+='"'+fileOrg+'" FileÀ» À̵¿ÇÒ ¼ö ¾ø´Ù.<BR>';
    return str;
  }
  fso.MoveFile(fileOrg,folderTgt+'\\');
  str+='"'+fileOrg+'" FileÀÌ "<B>'+folderTgt+'</B>" Folder·Î À̵¿µÇ¾ú´Ù.<BR>';

  return str;
}
function separateFolder(filePath){
  filewild=folderfinal=0;
  tmp=filePath.search(/(.*)(\\\*\.\*)/gi);
  if (tmp!=-1) filewild=1;
  tmp=filePath.search(/(.*)(\\.*\..{1,3})/gi);
  if (tmp==-1){
    folder=filePath;
    file='';
  } else {
    folder=RegExp.$1;
    file=RegExp.$2;
  }
  tmp=filePath.search(/\\$/gi);
  if (tmp!=-1) alert(finalfolder=1);
//  str+='['+folder+']'+'['+file+']<BR>';
}
</SCRIPT>
Folder ÇöȲº¸±â
°á°ú Ç¥½Ãâ.
Ŭ¸¯ÇÏ¿© Folder \deleteTest¸¦ »ý¼ºÇÏ¿©º¸¶ó.
Ŭ¸¯ÇÏ¿© Folder \deleteTest¸¦ »èÁ¦ÇØ º¸¶ó.
Ŭ¸¯ÇÏ¿© Folder \AddedFolder¸¦ »èÁ¦ÇØ º¸¶ó.
Ŭ¸¯ÇÏ¿© Folder AddedFolder¸¦ Ãß°¡ÇÏ¿© º¸¶ó.
<DIV id=showForderCreate class=show style="width:500" title="°á°ú">°á°ú Ç¥½Ãâ.</DIV>

<SCRIPT>
function createFolderTest(folderPath){
  str='»ý¼º "'+folderPath+'"<BR>';
  createFolder(folderPath);
  return str;
}

function deleteFolderTest(folderPath){
  str='»èÁ¦ "'+folderPath+'"<BR>';
  deleteFolder(folderPath);
  return str;
}

function addFolderTest(folderPath,newFolder){
  str='Ãß°¡ "'+folderPath+'"¿¡ Folder "'+newFolder+'"<BR>';
  addFolder(folderPath,newFolder);
  return str;
}
</SCRIPT>

<DIV class=show style=float:right title="°á°ú" onClick="checkFolders('c:\\JsTest')">Folder ÇöȲº¸±â</DIV>

<DIV class=show title="°á°ú"
  onClick="showForderCreate.innerHTML=createFolderTest('c:\\JsTest\\deleteTest')">
    Ŭ¸¯ÇÏ¿© Folder \deleteTest¸¦ »ý¼ºÇÏ¿©º¸¶ó.</DIV>
<DIV class=show title="°á°ú"
  onClick="showForderCreate.innerHTML=deleteFolderTest('c:\\JsTest\\deleteTest')">
    Ŭ¸¯ÇÏ¿© Folder \deleteTest¸¦ »èÁ¦ÇØ º¸¶ó.</DIV>
<DIV class=show title="°á°ú"
  onClick="showForderCreate.innerHTML=addFolderTest('c:\\JsTest','AddedFolder')">
    Ŭ¸¯ÇÏ¿© Folder AddedFolder¸¦ Ãß°¡ÇÏ¿© º¸¶ó.</DIV>
<DIV class=show title="°á°ú"
  onClick="showForderCreate.innerHTML=deleteFolderTest('c:\\JsTest\\AddedFolder')">
    Ŭ¸¯ÇÏ¿© Folder \AddedFolder¸¦ »èÁ¦ÇØ º¸¶ó.</DIV>
Folder ÇöȲº¸±â
°á°ú Ç¥½Ãâ.
Ŭ¸¯ÇÏ¿© FileÀ» »ý¼ºÇÏ¿© º¸¶ó.
Ŭ¸¯ÇÏ¿© \\delTestFile.txtÀ» »èÁ¦ÇÏ¿© º¸¶ó.
<DIV class=show style=float:right title="°á°ú" onClick="checkFolders('c:\\JsTest')">Folder ÇöȲº¸±â</DIV>
<DIV id=showFileCreate class=show style="width:500" title="°á°ú">°á°ú Ç¥½Ãâ.</DIV>

<SCRIPT>
function createFileTest(filePath){
  str='»ý¼º "'+filePath+'" File <BR>';
  createFile(filePath);
  return str;
}
</SCRIPT>

<DIV class=show title="°á°ú"
  onClick="showFileCreate.innerHTML=createFileTest('c:\\JsTest\\delTestFile.txt')">
    Ŭ¸¯ÇÏ¿© FileÀ» »ý¼ºÇÏ¿© º¸¶ó.</DIV>

<SCRIPT>
function deleteFileTest(filePath){
  str='»èÁ¦ "'+filePath+'" File<BR>';
  deleteFile(filePath);
  return str;
}
</SCRIPT>

<DIV class=show title="°á°ú"
  onClick="showFileCreate.innerHTML=deleteFileTest('c:\\JsTest\\delTestFile.txt')">
    Ŭ¸¯ÇÏ¿© \\delTestFile.txtÀ» »èÁ¦ÇÏ¿© º¸¶ó.</DIV>
°á°ú Ç¥½Ãâ.
Ŭ¸¯ÇÏ¿© c:\\JsTest\\subFolder ¸¦ c:\\JsTest\\subFolder2'·Î º¹»çÇÏ¿© º¸¶ó.
Ŭ¸¯ÇÏ¿© File \subFolder1\\copyFolderTest.txtÀ» »ý¼ºÇØ º¸¶ó.
Folder ÇöȲº¸±â
Ŭ¸¯ÇÏ¿© Folder \subFolder2¸¦ »èÁ¦ÇØ º¸¶ó.

ÀÌ ¿¹Á¦¿¡¼­´Â 'c:\\JsTest'ÀÇ ÇÏÀ§ Folder 'c:\\JsTest\\subFolder1'À» »ý¼ºÇÏ°í'c:\\JsTest\\subFolde2·Î º¹»çÇÑ´Ù. µ¤¾î¾²±â Çã¿ëÀ¸·Î µÇ¾î ÀÖ´Ù.

<DIV id=showFolderCopy class=show style="width:500" title="°á°ú">°á°ú Ç¥½Ãâ.</DIV>

<SCRIPT>
function copyFolderTest(folderOrg,folderTgt){
  str='º¹»ç "'+folderOrg+'" Folder ¢¡ "'+folderTgt+'" Folder <BR>';
  copyFolder(folderOrg,folderTgt);
  return str;
}
</SCRIPT>

<DIV class=show title="°á°ú"
  onClick="showFolderCopy.innerHTML=copyFolderTest('c:\\JsTest\\subFolder1','c:\\JsTest\\subFolder2')">
    Ŭ¸¯ÇÏ¿© c:\\JsTest\\subFolder ¸¦ c:\\JsTest\\subFolder2'·Î º¹»çÇÏ¿© º¸¶ó.</DIV>
<DIV class=show title="°á°ú"
  onClick="showFolderCopy.innerHTML=createFileTest('c:\\JsTest\\subFolder1\\copyFolderTest.txt')">
    Ŭ¸¯ÇÏ¿© File \subFolder1\\copyFolderTest.txtÀ» »ý¼ºÇØ º¸¶ó.</DIV>
<DIV class=show style=float:right title="°á°ú" onClick="checkFolders('c:\\JsTest')">Folder ÇöȲº¸±â</DIV>
<DIV class=show title="°á°ú"
  onClick="showFolderCopy.innerHTML=deleteFolderTest('c:\\JsTest\\subFolder2')">
    Ŭ¸¯ÇÏ¿© Folder \subFolder2¸¦ »èÁ¦ÇØ º¸¶ó.</DIV>
°á°ú Ç¥½Ãâ.
Folder ÇöȲº¸±â
Ŭ¸¯ÇÏ¿© \subFolder1 Æú´õÀÇ ¸ðµç È­ÀÏÀ» º¹»çÇÏ¿© º¸¶ó.
Ŭ¸¯ÇÏ¿© \subFolder1 Æú´õ¿¡¼­ 1°³ÀÇ È­ÀÏÀ» º¹»çÇÏ¿© º¸¶ó.
c:\\JsTest\\subFolder3 Folder°¡ ¾øÀ¸¸é Ŭ¸¯ÇÏ¿© »ý¼ºÇ϶ó.

ÀÌ ¿¹Á¦¿¡¼­´Â 'c:\\JsTest'ÀÇ ÇÏÀ§ Folder 'c:\\JsTest\\subFolder1'¿¡¼­ 'c:\\JsTest\\subFolde3À¸·Î º¹»çÇÑ´Ù.
µ¤¾î¾²±â Çã¿ëÀ¸·Î º¹»çÇÑ´Ù.

<DIV id=showFileCopy class=show style="width:500" title="°á°ú">°á°ú Ç¥½Ãâ.</DIV>

<SCRIPT>
function copyFileTest(fileOrg,folderTgt){
  str='º¹»ç "'+fileOrg+'" File ¢¡ "'+folderTgt+'" Folder <BR>';
  copyFile(fileOrg,folderTgt);
  return str;
}
</SCRIPT>

<DIV class=show style=float:right title="°á°ú" onClick="checkFolders('c:\\JsTest')">Folder ÇöȲº¸±â</DIV>
<DIV class=show title="°á°ú"
  onClick="showFileCopy.innerHTML=copyFileTest('c:\\JsTest\\subFolder1\\*\.*','c:\\JsTest\\subFolder3')">
    Ŭ¸¯ÇÏ¿© \subFolder1 Æú´õÀÇ ¸ðµç È­ÀÏÀ» º¹»çÇÏ¿© º¸¶ó.</DIV>
<DIV class=show title="°á°ú"
  onClick="showFileCopy.innerHTML=copyFileTest('c:\\JsTest\\subFolder1\\testfile.*','c:\\JsTest\\subFolder3')">
    Ŭ¸¯ÇÏ¿© \subFolder1 Æú´õ¿¡¼­ 1°³ÀÇ  È­ÀÏÀ» º¹»çÇÏ¿© º¸¶ó.</DIV>
<DIV class=show title="°á°ú"
  onClick="showFileCopy.innerHTML=createFolderTest('c:\\JsTest\\subFolder3')">
    c:\\JsTest\\subFolder3 Folder°¡ ¾øÀ¸¸é Ŭ¸¯ÇÏ¿© »ý¼ºÇ϶ó.</DIV>
°á°ú Ç¥½Ãâ.
Ŭ¸¯ÇÏ¿© Folder¸¦ "\subFolder1"¿¡¼­ "\subFolder4"·Î À̵¿½ÃÄÑ º¸¶ó.
Ŭ¸¯ÇÏ¿© Folder¸¦ "\subFolder4"¿¡¼­ "\subFolder1"·Î À̵¿½ÃÄÑ º¸¶ó.
Folder ÇöȲº¸±â
Folder°¡ µÑ´Ù Á¸ÀçÇϸé "c:\\JsTest\\subFolder4"¸¦ »èÁ¦Ç϶ó.

ÀÌ ¿¹Á¦¿¡¼­´Â 'c:\\JsTest'ÀÇ ÇÏÀ§ Folder 'c:\\JsTest\\subFolder1'¿¡¼­ 'c:\\JsTest\\subFolde4·Î À̵¿ÇÑ´Ù.
¶ÇÇÑ ¿ªÀ¸·Î Folder 'c:\\JsTest\\subFolder4'¿¡¼­ 'c:\\JsTest\\subFolder1·Î À̵¿ÇÑ´Ù.

<DIV id=showFolderMove class=show style="width:500" title="°á°ú">°á°ú Ç¥½Ãâ.</DIV>

<SCRIPT>
function moveFolderTest(folderOrg,folderTgt){
  str='À̵¿ "'+folderOrg+'" Folder ¢¡ "'+folderTgt+'" Folder <BR>';
  moveFolder(folderOrg,folderTgt);
  return str;
}
</SCRIPT>
<DIV class=show title="°á°ú"
  onClick="showFolderMove.innerHTML=moveFolderTest('c:\\JsTest\\subFolder1',
'c:\\JsTest\\subFolder4')">
    Ŭ¸¯ÇÏ¿© Folder¸¦ "\subFolder1"¿¡¼­ "\subFolder4"·Î À̵¿½ÃÄÑ º¸¶ó.</DIV>
<DIV class=show title="°á°ú"
  onClick="showFolderMove.innerHTML=moveFolderTest('c:\\JsTest\\subFolder4','c:\\JsTest\\subFolder1')">
    Ŭ¸¯ÇÏ¿© Folder¸¦ "\subFolder4"¿¡¼­ "\subFolder1"·Î À̵¿½ÃÄÑ º¸¶ó.</DIV>
<DIV class=show style=float:right title="°á°ú" onClick="checkFolders('c:\\JsTest')">Folder ÇöȲº¸±â</DIV>
<DIV class=show title="°á°ú"
  onClick="showFolderMove.innerHTML=deleteFolderTest('c:\\JsTest\\subFolder4')">
    Folder°¡ µÑ´Ù Á¸ÀçÇϸé "c:\\JsTest\\subFolder4"¸¦ »èÁ¦Ç϶ó.</DIV>
°á°ú Ç¥½Ãâ.
Ŭ¸¯ÇÏ¿© c:\JsTest\subFolder1\testMvfile.txt¸¦ c:\JsTest\\subFolder3\' ·Î À̵¿ÇØ º¸¶ó.
Ŭ¸¯ÇÏ¿© c:\JsTest\subFolder3\testMvfile.txt¸¦ c:\JsTest\\subFolder1\' ·Î À̵¿ÇØ º¸¶ó.
c:\JsTest\subFolder1\testMvfile.txt FileÀÌ ¾øÀ¸¸é »ý¼º
Folder ÇöȲº¸±â
c:\JsTest\subFolder3 Folder°¡ ¾øÀ¸¸é »ý¼º
c:\JsTest\subFolder3\testMvfile.txt »èÁ¦
c:\JsTest\subFolder3\testMvfile1.txt »èÁ¦
c:\JsTest\subFolder1\testMvfile.txt¸¦ c:\JsTest\\subFolder3\testMvfile1.txt' ·Î À̵¿.

ÀÌ ¿¹Á¦¿¡¼­´Â 'c:\\JsTest'ÀÇ ÇÏÀ§ Folder 'c:\\JsTest\\subFolder1'¿¡¼­ testMvfile.txt' À» ¸¸µé°í Folder¸¦ »ý¼ºÇÏ¿© 'c:\\JsTest\\subFolder3À¸·Î À̵¿ÇÑ´Ù.

<DIV id=showFileMove class=show style="width:500" title="°á°ú">°á°ú Ç¥½Ãâ.</DIV>

<SCRIPT>
function MoveFileTest(fileOrg,folderTgt){
  str='À̵¿ "'+fileOrg+'" File ¢¡ "'+folderTgt+'" Folder <BR>';
  moveFile(fileOrg,folderTgt);
  return str;
}
</SCRIPT>
<DIV class=show title="°á°ú"
  onClick="showFileMove.innerHTML=MoveFileTest('c:\\JsTest\\subFolder1\\testMvfile.txt',
    'c:\\JsTest\\subFolder3\\')">Ŭ¸¯ÇÏ¿© c:\JsTest\subFolder1\testMvfile.txt¸¦
     c:\JsTest\\subFolder3\' ·Î À̵¿ÇØ º¸¶ó.</DIV>
<DIV class=show title="°á°ú"
  onClick="showFileMove.innerHTML=MoveFileTest('c:\\JsTest\\subFolder3\\testMvfile.txt',
    'c:\\JsTest\\subFolder1\\')">Ŭ¸¯ÇÏ¿© c:\JsTest\subFolder3\testMvfile.txt¸¦
     c:\JsTest\\subFolder1\' ·Î À̵¿ÇØ º¸¶ó.</DIV>

<DIV class=show title="°á°ú"
  onClick="showFileMove.innerHTML=createFileTest('c:\\JsTest\\subFolder1\\testMvfile.txt')">
    c:\JsTest\subFolder1\testMvfile.txt FileÀÌ ¾øÀ¸¸é Ŭ¸¯ÇÏ¿© »ý¼ºÇ϶ó.</DIV>

<DIV class=show style=float:right title="°á°ú" onClick="checkFolders('c:\\JsTest')">Folder ÇöȲº¸±â</DIV>

<DIV class=show title="°á°ú"
  onClick="showFileMove.innerHTML=createFolderTest('c:\\JsTest\\subFolder3')">
    c:\JsTest\subFolder3 Folder°¡ ¾øÀ¸¸é Ŭ¸¯ÇÏ¿© »ý¼ºÇ϶ó.</DIV>
<DIV class=show title="°á°ú"
  onClick="showFileMove.innerHTML=deleteFileTest('c:\\JsTest\\subFolder3\\testMvfile.txt')">
    ¾çÂÊ ÆúÅÍ¿¡ ÀÖÀ¸¸é c:\JsTest\subFolder3\testMvfile.txtÀ» »èÁ¦Ç϶ó.</DIV>
Folder ÇöȲº¸±â
<SCRIPT>
function checkFolders(folderPath){
  if (!fso) initialize();
  var drvname,enumObj,enum1;
  if (!fso.FolderExists(folderPath)){
    alert(folderPath+'°¡ Á¸ÀçÇÏÁö ¾Ê´Â´Ù.');
    return;
  }
  subfolderPath=fso.GetFolder(folderPath);
  str='<TABLE border=1 cellpadding=1 cellspacing=0 align=center width=100%>';
  str+='<TR><TH colspan=9>'+subfolderPath.Path+'</TH></TR>';
  str+='<TR bgcolor=eeeeee align=center class=small><TD>#</TD>';
  str+='<TD colspan=2><SPAN style=background:ffa>Folder</SPAN> / <SPAN style=background:aff>File</SPAN></TD>';
  str+='<TD>À̸§</TD><TD>ÃÖÃÊ »ý¼ºÀÏ</TD>';
  str+='<TD>ÃÖÁ¾ Á¢¼ÓÀÏ</TD><TD>ÃÖÁ¾ ¼öÁ¤ÀÏ</TD><TD class=small>Atr</TD></TR>';
  fontpct='<COL style=font-size:90%>';
  str+=fontpct+fontpct+fontpct+fontpct+fontpct+fontpct+fontpct+fontpct;

  enum1=new Enumerator(subfolderPath.SubFolders);
  i=0;
  for (; !enum1.atEnd();enum1.moveNext()){
    folder1=enum1.item();
    if (!i){
      parentVar=folder1.ParentFolder;
      str+='<TR bgcolor=ffffaa><TD colspan=3 align=center>'+parentVar+'</TD>';
      str+='<TD>'+parentVar.Name+'</TD>';
      created=dateConv(new Date(parentVar.DateCreated));
      accessed=dateConv(new Date(parentVar.DateLastAccessed));
      modified=dateConv(new Date(parentVar.DateLastModified));
      str+='<TD>'+created+'</TD><TD>'+accessed+'</TD>';
      str+='<TD>'+modified+'</TD><TD>'+parentVar.Attributes+'</TD></TR>';
      filesCheck(parentVar);
    }
    str+='<TR bgcolor=ffffaa><TD>'+i+'</TD><TD colspan=2>'+folder1+'</TD>';
    str+='<TD>'+folder1.Name+'</TD>';
    created=dateConv(new Date(folder1.DateCreated));
    accessed=dateConv(new Date(folder1.DateLastAccessed));
    modified=dateConv(new Date(folder1.DateLastModified));
    str+='<TD>'+created+'</TD><TD>'+accessed+'</TD>';
    str+='<TD>'+modified+'</TD><TD>'+folder1.Attributes+'</TD></TR>';
    filesCheck(folder1);
    i++;
  }
  str+='</TABLE>';
  newWin=openWin(str);
}

function filesCheck(folder1){
  enum2=new Enumerator(folder1.Files);
  j=0;
  for (; !enum2.atEnd();enum2.moveNext()){
    file1=enum2.item();
    str+='<TR bgcolor=aaffff><TD> </TD><TD>'+j+'</TD><TD>'+file1+'</TD><TD>'+file1.Name+'</TD>';
    created=dateConv(new Date(folder1.DateCreated));
    accessed=dateConv(new Date(folder1.DateLastAccessed));
    modified=dateConv(new Date(folder1.DateLastModified));
    str+='<TD>'+created+'</TD><TD>'+accessed+'</TD>';
    str+='<TD>'+modified+'</TD><TD>'+folder1.Attributes+'</TD></TR>';
    j++;
  }
}

function openWin(str){
  newWin=window.open('','pop','top=10,left=50,width=800,height=250,scrollbars=yes,resizable=yes');
  newWin.document.write('<LINK rel="stylesheet" type="text/css" href="../../public/jscript.css">');
  newWin.document.write(str);
  newWin.document.write('<BR><A href=javascript:self.close()>â´Ý±â</A>');
}

function dateConv(t){
  return(t.getYear()+'/'+(t.getMonth()+1)+'/'+t.getDate()+':'+t.getHours()+':'+t.getMinutes()+':'+t.getSeconds());
}
</SCRIPT>
<DIV class=show title="°á°ú" onClick="checkFolders('c:\\JsTest')">Folder ÇöȲº¸±â</DIV>