title: Copy file from sub-folder to parent folder and rename the file with parent folder name
body: <p>I have the below 5 folders on the desktop. </p>
  
  <p><a href="https://i.stack.imgur.com/9bjkC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9bjkC.png" alt="enter image description here"></a></p>
  
  <p>Each of these folders has a sub-folder word and the word sub-folder contains file document.xml. For example, This is the path of the file</p>
  
  <pre><code>(C:\Users\u0119342\Desktop\LEG_DOWNLOAD\BACK UP DOCX\document\Australian Citizenship (Transitionals and Consequentials) Act 2007\word\document.xml).
  </code></pre>
  
  <p>I would like to move the document.xml out of the sub-folder word to the parent folder <code>"Australian Citizenship (Transitionals and Consequentials) Act 2007"</code> and rename it as <code>"Australian Citizenship (Transitionals and Consequentials) Act 2007"</code>.</p>
  
  <p>I want to do the same process for all the document.xml files in the rest of the four folders.</p>
  
  <p>Please advise me if there is a way to do this with power shell or batch script.</p>
  
  <p>Thanks,</p>
  
  <p>Venkat</p>