title: File Failing to copy to another directory (fs.access and copyFile)
body: <p>I'm trying to copy pdf and/or word documents from one folder into another. The code below works sometimes, but then other times it does not.</p>
  
  <pre><code>app.post('/api/file_archive/:file_name', function (req, res) {
      var file_name = req.params.file_name;
      var src = 'public/uploads/files/' + file_name;
      var dest = 'archived_files/files';
  
      if(file_name != "") {
          console.log("Entered fs access");
          fs.access(dest, function(err) {
              if(err)
                  fs.mkdirSync(dest);
  
              copyFile(src, path.join(dest, file_name));
              res.json({ message: 'file archived!'});
  
  
          });
      };
  });
  </code></pre>
  
  <p>I'm currently receiving this error:</p>
  
  <pre><code>{ Error: ENOENT: no such file or directory, open 'C:\Users\duquetr\Documents\maize-and-blue-brief\public\uploads\files\1495121011192_Letter of Rec for RJ.pdf' at Error (native) errno: -4058, code: 'ENOENT', syscall: 'open', path: 'C:\\Users\\duquetr\\Documents\\maize-and-blue-brief\\public\\uploads\\files\\1495121011192_Letter of Rec for RJ.pdf' }
  </code></pre>
  
  <p>I've searched around a bit and I can't seem to find anything that pertains to why this code <i>sometimes</i> works.</p>
  
  <p>Thanks for your help!</p>