title: How to create folder on disk like timestamp using Javascript
body: <p>I have a script which process a file and put in specific folder. There is a part of it:</p>
  
  <pre><code> String.prototype.repeat = function(n)
              {
                  return new Array( n + 1 ).join(this);
              }
  
              //WScript.Echo("JScript");
  
              var fields = new Array ();
              var fso = new ActiveXObject("Scripting.FileSystemObject");
              file_name = "C:\\SOURCE_FILE\\ext"; //Source folder + file name     
              var file_in = fso.OpenTextFile(file_name + ".dat", 1, false);       //file for processing
              file_name_out = "C:\\DEST_DIR\\ext";    //folder for result file + file profix  
  
  
      // create sToday wich I want to use in folder creation and for concatenaiting to file
      var today = new Date();
      var CurrentMonth = (today.getMonth()+1);
      var CurrentDay = (today.getDay());
      if (CurrentDay&lt;10)
      var sToday = "0"+today.getDate().toString();
      else 
      var sToday = today.getDate().toString();
      if(CurrentMonth&lt;10)
      sToday += "0";
      else 
      sToday += "";
      sToday += (today.getMonth()+1).toString();
      sToday += today.getYear().toString();
      //sToday += today.getHours().toString();
      //sToday += today.getMinutes().toString();
      //sToday += today.getSeconds().toString();
  
  dest_dir = "C:\\DEST_DIR\\"+sToday; //Here I am trying to crate a folder like timestamp, but it does not work =(((  
              var file_xml = fso.OpenTextFile(dest_dir + sToday + ".dat", 2, true);   //result file 
              var log = fso.OpenTextFile(file_name_out + sToday + "_log.txt", 2, true);       //log file
  </code></pre>
  
  <p>So, could anybody help me to create a folder like timestamp into "C:\DEST_DIR\".</p>