title: Python. Rename files in subdirectories
body: <p>Could you please help me to modify below script to change the name of files also in subdirectories.</p>
  
  <pre><code>def change():
      path = e.get()
      for filename in os.walk(path):
          for ele in filename:
              if type(ele) == type([]) and len(ele)!=0:
                  for every_file in ele:
  
                      if every_file[0:6].isdigit():
                          number = every_file[0:6]
                          name = every_file[6:]
                          x = int(number)+y
                          newname = (str(x) + name)
                          os.rename(os.path.join(path, every_file), os.path.join(path, newname))
  </code></pre>