title: How rename the images in folder
body: <p>I have 35 folders and each folder contains 50 images, and every image has a different name, like <code>copy(3), rename, youanem</code> and so on. I want to rename all the images in all the folders to sequence numbers, i.e. folder <code>0</code> contains 50 images, and it should give them numbers like 0-49 and the same for the rest of the folders and their images. Folder names are 0-9 and then A-Z.</p>
  
  <p>Is this possible to program for it , or i have to do it manually</p>
  
  <p>This is my initial try , i didnt try it completely :</p>
  
  <pre><code>from os import rename, listdir
  
  folder = "D://images//"
  fnames = listdir('.')
  
  for fname in fnames:
      if fname.startswith(folder):
          rename(fname, fname.replace(name, '', 1))
  </code></pre>
  
  <p>I am not getting idea of how to give it name</p>
  
  <p>Thanks</p>