I’m trying to concatenate a bunch of 1GB files using PowerShell. Normally I would do this in windows cmd.exe with, copy /b file.txt.0+file.txt.1 file.txt
. However, the workstation I’m on has cmd.exe disabled. How can I run this same command in PowerShell? When I run it exactly the same, I get the following error,
Copy-Item : A positional parameter cannot be found that accepts argument 'file.txt'.
At line:1 char:1
+ copy /c file.txt.0+file.txt.1 file.txt
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Copy-Item], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.CopyItemCommand
I’ve also tried this, but it seems to just overrite the output with whatever the last input file is,
copy -Path [file.txt.0, file.txt.1] -Destination file.txt