title: Rename file to uppercase in the same directory using Java
body: <p>I am trying to rename files in same Windows directory using Java -</p>
  
  <p><code>Before: -</code></p>
  
  <p><em>C:/Temp/abG.txt</em></p>
  
  <p><code>After: -</code></p>
  
  <p><em>C:/Temp/ABG.TXT</em></p>
  
  <p>I have tried using <code>file.renameTo</code> but that did not work. Now I am trying to use -</p>
  
  <pre><code>Path source = file.toPath();
  Files.move(source, source.resolveSibling(file.getName().toUpperCase()));
  </code></pre>
  
  <p>Still no luck. Please help.</p>