title: Os.walk can't find xml file
body: <p>I am getting this error:</p>
  
  <blockquote>
    <p>source = open(source, "rb")
      IOError: [Errno 2] No such file or directory: 'XXX.xml'</p>
  </blockquote>
  
  <p>I know the file exist in the directory but it won't find it. I believe I need to use the "dirs" from my for loop?</p>
  
  <pre><code>jdata = json.load(open(json_path))
  if os.path.isdir(osWalkpath):
      for root, dirs, files in os.walk(path):
          print root, dirs, files
          for key, value in jdata.iteritems():
              for name in files:
                  try:
                      dirs.remove('.svn')
                  except ValueError:
                      pass
                  with open(os.path.join(root, name)) as fle:
                      content = fle.read()
                  FindName(content, key, name, value) # &lt;--- It complains here
  
  def FindName(content, key, name, value):
      if name.endswith('.arxml') and re.search(Wordboundry(key), content):
          print "Name", key, "was found in", name, "\n"
          OverrideXML(key, value, name)
  </code></pre>
  
  <p>It seems like when I give the full path to where the file is it will find it, but when I just give a part of the path it will not find it.</p>
  
  <p>Ex:</p>
  
  <pre><code>"C:\MyPath\XML\Dir1\ #Full path where the file exist
  "C:\MyPath\XML\  #Not the full path (but file exist in the subdir "Dir1) and gives error since it can't find the XML
  </code></pre>
  
  <p>Some outputs:</p>
  
  <blockquote>
    <p>Name XYZ was found in XXX.xml &lt;--- like wtf it finds the file</p>
  </blockquote>