I saw this already Fast and simple binary concatenate files in Powershell
I'm not interested by the answer above I'm interested about what's wrong with syntax below :
when I call a cmd.exe command like copy /b:
function join-file {
copy /b $($args[0])+$($args[1]) $($args[2])
}
I get an error Copy-Item : A positional parameter cannot be found
As the error alludes to, copy is actually just an alias for Copy-Item and it does not have a /b parameter. You can call cmd to use its copy command.
function join-file {
cmd /c copy /b $($args[0])+$($args[1]) $($args[2])
}
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