title: Conditional renaming with batch file
body: <p>i'd like to rename two files in a specific directory on my computer with a batch file.
  The problem is that i'd like, if it's possible doing so with standard batch commands, to rename the files conditionally. To be more specific, my example is as follows:</p>
  
  <p>I've got two "hosts" files located in C:\Windows\System32\drivers\etc; one is named "hosts", the other is named "hosts_X", a "hosts" file that contains specific instructions that i need to be active in a specific case.</p>
  
  <p>I'd like to switch between this two "hosts" files: there are two cases: case "A" in which there's a "hosts" file and a "hosts_X" file, case "B" in which the original "hosts" file is renamed to "hosts_Y" and "hosts_X" is renamed to "hosts".</p>
  
  <p>Is it possible to have a single batch file that renames the two files conditionally? Like, if there's a file named "hosts" and a file named "hosts_x", rename "hosts" to "hosts_y" and "hosts_x" to hosts, and if there's a file named "hosts" and a file named "hosts_y", rename "hosts" to "hosts_x" and "hosts_y" to "hosts"?</p>
  
  <p>Thank you for any info and help!</p>