title: How to rename multiple folders using spreadsheet?
body: <p>If I'm on windows 7 and I have a spreadsheet:</p>
  
  <pre><code>1, Ant
  2, Brown Bear  (note whitespace)
  3, Cat
  4, Dinosaur
  </code></pre>
  
  <p>And folders</p>
  
  <pre><code>C:\Directory\1\
  C:\Directory\2\
  C:\Directory\4\
  </code></pre>
  
  <p>Is there any way to put in a batch file or a vbs file or whatever the appropriate tool is in that directory that would rename those folders using the spreadsheet? With the final result being:</p>
  
  <pre><code>C:\Directory\1 Ant\
  C:\Directory\2 Brown Bear\
  C:\Directory\4 Dinosaur\
  </code></pre>
  
  <p>So far I have a batch file that will append a string to all the folders in the directory it's run in (be cautious where you run it), but I'd just be using if statements for many, many items. Any suggestions on how to connect it to a csv file?</p>
  
  <p>@echo off</p>
  
  <pre><code>for /f "tokens=1,2,* delims=,(" %%a in ('dir /a:d /b') do (
  
      if "%%a" == "10" ( ren "%%a" "%%a Elephant" )
      if "%%a" == "11" ( ren "%%a" "%%a Otter")
  )
  </code></pre>
  
  <p>Thanks in advance.</p>