Skip to content

Instantly share code, notes, and snippets.

@kbilsted
Created September 28, 2020 07:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kbilsted/456644ad4b8b80265b0a597dc73a6bce to your computer and use it in GitHub Desktop.
Save kbilsted/456644ad4b8b80265b0a597dc73a6bce to your computer and use it in GitHub Desktop.
Call `COMMAND` on all `.foo` files and output it to `.bar` files.
dir *.foo | foreach-object { $newname = $_.Name.Remove($_.Name.Length - $_.Extension.Length) + ".bar"; COMMAND -vn -n -i "$_" $newname }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment