title: PowerShell - How to execute BAT (batch) command on specific file? (Concatenate path and command and propagate arguments )
body: <p>I need to execute in PowerShell 5 some <strong>robot</strong> (RobotFramework) batch file on specific robot file.
  Simple usage by documentation is: "robot file.robot" which works but in the PowerShell script I am having issues.
  I defined:</p>
  
  <pre><code>$ROBOT_PATH="C:\Program Files\Robot\Scripts"
  </code></pre>
  
  <p>But when trying to execute:</p>
  
  <pre><code>$ROBOT_PATH\robot.bat User.robot
  </code></pre>
  
  <p>Getting an Error: <code>Unexpected token '\robot.bat' in expression or statement.</code></p>
  
  <p>If I try:
  <code>"$ROBOT_PATH\robot.bat" User.robot</code>  or   <code>"$ROBOT_PATH\robot.bat" "User.robot"</code>  then getting: Unexpected <code>token '"User.robot"' in expression or statement.</code></p>
  
  <p>So how to concatenate <strong>Path</strong> and <strong>Command</strong> and propagate <strong>Arguments</strong> for that command?
  Important thing to emphasize is that I should not first do the "<strong>cd</strong> to PATH" before executing the command. If I do the <strong>"cd"</strong> then it works!</p>