title: Python: Convert contents of a file to Uppercase characters only
body: <p>I am trying to convert the contents a set of files to only uppercase characters. Heres the code I have so far:</p>
  
  <pre><code>import os
  
  def test():
      os.chdir("C:/Users/David/Files")
      files = os.listdir(".")
      for x in files:
          inputFile = open(x, "r")
          content = inputFile.read()
          with open(x, "wb") as outputFile:
                  str.upper(content)
  </code></pre>
  
  <p>When I run it all it does it delete the content of the file.</p>