pwsh string cmd

compose multiple variables into a command line, then execute it.


$dest="a:\des"
$source="b:\src"

$cmdlink="cmd"
$cmdPart1="/c", "mklink", "/j"

& $cmdlink $cmdPart1 $dest\juncname1  $source\hello
& $cmdlink $cmdPart1 $dest\juncname2  $source\world
& $cmdlink $cmdPart1 $dest\juncname3  $source\peace
posted @ 2023-06-22 08:17  fndefbwefsowpvqfx  阅读(2)  评论(0编辑  收藏  举报