title: Powershell to executable .bat
body: <p>I'm trying to get the script below, which is in Powershell, converted to an executable .bat file. The basic idea is that I have a bunch of files of which the file name exists out of 3 parts:</p>
  
  <ul>
  <li><p>Part 1: TKSYSTEMID</p></li>
  <li><p>Part 2: Variable name</p></li>
  <li><p>Part 3: YYYY MM DD HHMM</p></li>
  </ul>
  
  <p>So a simple example would look like: <code>TKSYSTEMID NOTES YYYY MM DD HHMM</code></p>
  
  <p>I'm looking for a .bat file that can replace the TKSYSTEM ID and the YYYY MM DD HHMM with something the user gets prompted to input.</p>
  
  <p>The powershell script I have so far is: </p>
  
  <pre><code>$NEWSYSTEMID = Read-Host -Prompt 'Please input SEJ SYSTEM ID' 
  Write-Host "Changing TKSYSTEMID to '$NEWSYSTEMID'" 
  dir | Rename-Item -NewName {$_.name -replace 'TKSYSTEMID',$NEWSYSTEMID}
  
  $NEWDATETIME = Read-Host -Prompt 'Please input the upload date and time' 
  Write-Host "Changing YYYY MM DD HHMM to '$NEWDATETIME'" 
  dir | Rename-Item -NewName {$_.name -replace 'YYYY MM DD HHMM',$NEWDATETIME}
  </code></pre>
  
  <p>Could someone be so kind as to show me how to convert this or to provide a .bat script for this? It would mean the world. </p>