minus-squarebrisk@aussie.zonetoProgramming@beehaw.org•Powershell: How do I update my code to use a different file type?linkfedilinkarrow-up4·10 months agoIt’s markdown, you should be able to indent your lines by 4 spaces or fence with triple backtics to get code blocks. Your client’s editor may have a button to help ``` $file = Get-Content -Path .\individuals2.txt foreach ($line in $file) { Copy-Item -Path .\template.docx -Destination ".\$(2 + $line + '.docs')" } ``` Becomes $file = Get-Content -Path .\individuals2.txt foreach ($line in $file) { Copy-Item -Path .\template.docx -Destination ".\$(2 + $line + '.docs')" } linkfedilink
It’s markdown, you should be able to indent your lines by 4 spaces or fence with triple backtics to get code blocks. Your client’s editor may have a button to help
Becomes
$file = Get-Content -Path .\individuals2.txt foreach ($line in $file) { Copy-Item -Path .\template.docx -Destination ".\$(2 + $line + '.docs')" }