title: Renaming files using node.js
body: <p>I am quite new in using JS, so I will try to be as specific as I can :)</p>
  
  <ul>
  <li><p>I have a folder with 260 .png files with different country names: <code>Afghanistan.png</code>, <code>Albania.png</code>, <code>Algeria.png</code>, etc.</p></li>
  <li><p>I have a .json file with a piece of code with all the ISO codes for each country like this:</p></li>
  </ul>
  
  <pre>
  {  
    "AF" : "Afghanistan",  
    "AL" : "Albania",  
    "DZ" : "Algeria",  
    ...  
  }
  </pre>
  
  <ul>
  <li>I would like to rename the .png files with their ISO name in low-case. That means I would like to have the following input in my folder with all the <code>.png</code> images:
  <code>af.png</code>, <code>al.png</code>, <code>dz.png</code>, etc.</li>
  </ul>
  
  <p>I was trying to research by myself how to do this with node.js, but I am a little lost here and I would appreciate some clues a lot.</p>
  
  <p>Thanks in advance!</p>