In bash I use ./task1.sh && ./task2.sh
to run task1, and then run task2 as long as task1 did not return an error code. When I try .\task1.bat && .\task2.bat
in Powershell I get the error "The Token && Is not a valid separator in this version."
Is there an equivalent for && in Windows Powershell?
This is the closest I can get:
.\task1.ps1 ; if($?){.\task2.ps1}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With