0
votes

I have 3 partial files that I need to merge to just 1 zip. When using this PowerShell script:

copy /b v9_setup.1 + v9_setup.2 + v9_setup.3 v9_setup.zip

I get this error:

Copy-Item : A positional parameter cannot be found that accepts argument
'v9_setup.2'.
At line:1 char:1
+ copy /b v9_setup.1 v9_setup.2 v9_setup.3 v9_setup.zip
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Copy-Item], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.CopyItemCommand

I am using Windows 10 Pro.

1
In powershell copy is an alias for the copy-item cmdlet which doesn't understand the cmd.exe internal copy syntax.user6811411
Did you use PowerShell to initially separate the file into partial files? If so can you please edit your question to include this code? Usually it is best to use the same program or method to combine partial files.Bluecakes
@LotPings Using copy-item gives the same error. Thanks.user1287678
@Bluecakes No, i did not separate the files. Thanks.user1287678
@user1287678 copy is the alias in powershell for copy-item LotPings is trying to say that you are trying to use the copy command from cmd rather than the copy-item cmdlet, because the copy-item cmdlet doesn't concatenate like copy -b does. Run your script in cmd and it should work.BenH

1 Answers

0
votes

As LotPings and user1287678 says, running the script in cmd.exe works. Thanks.