I'm implementing a GitHub workflow and I need to run a batch (*.bat) script under PowerShell with a variable part. This doesn't seem to work. A simple batch script is running fine. But when I try to insert a variable into its name it doesn't
I've tried these with no success:
run: |
$i=2
call "myscript_$i.bat"
run: |
$i=2
.\myscript_$i.bat
run: |
$i=2
.\myscript_${env:i}.bat
Is there any Obi-Wan who can help on this? )
& '.\script.bat'?envand just using${i}and see if that works? Maybe try$($i), it might work