title: Error: ENOENT: no such file or directory, rename (even though the directory exists)
body: <p>I am just learning express.js for a while.I am just learning image upload using angular.js,When the file uploaded to temp dir,I have to move that file to a new directory.Yes, That directory exists.But it still shows this error.</p>
  
  <pre><code>User 572b94b4f30179941f5f7c5dis submittin { fieldName: 'file',
    originalFilename: 'Capture.PNG',
    path: 'C:\\Users\\arfo\\AppData\\Local\\Temp\\zK2-mOXhXflzjrKfxoACnuiw.PNG',
    headers:
     { 'content-disposition': 'form-data; name="file"; filename="Capture.PNG"',
       'content-type': 'image/png' },
    size: 92643,
    name: 'Capture.PNG',
    type: 'image/png' }
  { [Error: ENOENT: no such file or directory, rename 'C:\Users\arfo\AppData\Local\Temp\zK2-mOXhXflzjrKfxoACnuiw.PNG' -&gt; 'C:\Users\arfo\Desktop\all folders\sn\uploads\572b94b4f30179941f5f
  7c5d2016-05-06T12:15:52.934ZCapture.PNG']
    errno: -4058,
    code: 'ENOENT',
    syscall: 'rename',
  </code></pre>
  
  <p>But i have that directory exists</p>
  
  <pre><code>C:\Users\arfo\Desktop\all folders\sn\uploads
  </code></pre>
  
  <p>This is my code
  profile-controller.js</p>
  
  <pre><code>var User = require('../datasets/users');
  var fs = require('fs-extra');
  var path = require('path');
  
  module.exports.updatePhoto = function (req,res) {
      var file = req.files.file;
      var userId = req.body.userId;
      console.log("User " + userId+"is submittin" , file);    
      var uploadDate = new Date().toISOString();   
  
      var tempPath = file.path;
      var targetPath = path.join(__dirname, "../../uploads/"+ userId + uploadDate +file.name);
      var savepath = "/uploads/"+userId+ uploadDate +file.name;
  
      fs.rename(tempPath,targetPath,function (err) {
          if(err){
              console.log(err)
          }else{
              console.log("filemoved");
              /*User.findById(userId,function (err,userData) {
                  var user = userData;
                    user.image = savepath;
                    user.save(function (err) {
                        if (err){
                            console.log("Faile ");
                        }else{
                            console.log("Save success");
                        }
                    })
              })*/
          }
  
      })
  };
  </code></pre>