title: No such file or directory in ftplib?
body: <p>So, I'm trying to write a synchronization program for files on my tablet and other computers. Unfortunately, I'm only fairly familiar with python and ftplib. Here's the code:</p>
  
  <pre><code>#DOWNLOADING
  for file in rContents:
      if rIsFolder(ftp, file):
          rFolders.append(file)
          continue
      if file in contents:
          print "%s already uploaded." % file
      else:
          try:
              print ftp.pwd()
              print "Downloading %s..." % file
              with open(file, 'rb') as f:        
                  ftp.retrbinary('RETR %s' % file, f.write)
              print "    ...done."
          except:
              print "Failed download of %s." % file
  </code></pre>
  
  <p>I'm especially concerned with these two lines:</p>
  
  <pre><code>with open(file, 'rb') as f:        
              ftp.retrbinary('RETR %s' % file, f.write)
  </code></pre>
  
  <p>On the line "with open..." I get this error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "FolderSync.py", line 145, in &lt;module&gt;
      sync(ftp, folder, tabFolder)
    File "FolderSync.py", line 67, in sync
      with open(file, 'rb') as f:        
  IOError: [Errno 2] No such file or directory: 'u.txt'
  </code></pre>
  
  <p>I'm actually using ftp.nlst() to get these file names, so 'u.txt' is absolutely there, but on the ftp side. Am I doing this wrong? Is there a different function to open this file remotely?</p>