title: What is the solution for reference error with javascript?
body: <p>I have a javascript code embedded in HTML, which copies files from one folder to another.</p>
  
  <pre><code>&lt;script&gt;
       function moveFile(test, production){
       var myObject, f;
       f = new ActiveXObject("Scripting.FileSystemObject");                                          
       f.Copyfile(test,production)
       setTimeout(function(){alert("Production image updated successfully!")},1000);                                                                            
                  }
    &lt;/script&gt;
  </code></pre>
  
  <p>When I try to run this, on IE10 I get error for permission denied. While on chrome and FF, I get error "<strong>ReferenceError: ActiveXObject is not defined</strong>"</p>
  
  <p>How to resolve this? <strong>Also let me know if there a better way to have feature to copy files which is compatible on all browsers.</strong></p>