Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • Something is going wrong when I try this. I get the error You must provide a value expression on the right-hand side of the '-join' operator. Can you provide the line of code that I can cut and paste to see what I'm doing wrong? Remember too, that it must work with Powershell v2. Commented Jun 19, 2017 at 16:10
  • Thank you for the update! :) When I try it, I get the closing curly brace appended to the output filename. Commented Jun 19, 2017 at 16:38
  • @RockPaperLizard Np! Try replacing file2.txt with "file2.txt", or > by the built-in | Out-File Commented Jun 19, 2017 at 16:42
  • The enclosing in double-quotes didn't work (still get the curly brace). Will try Out-File. Commented Jun 19, 2017 at 16:56
  • So far, Out-File not working because the Windows command processor (and not powershell) is interpreting the pipe symbol. Commented Jun 19, 2017 at 17:16