Copy-Item : Cannot convert 'System.Object[]' to the type 'System.String' required by parameter 'Path'. Specified method is not
supported.
At line:2 char:15
+ Copy-Item $filSource, $filDestination
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Copy-Item], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgument,Microsoft.PowerShell.Commands.CopyItemCommand
Get-Item : Cannot find path 'C:\New\cpApplication.txt' because it does not exist.
At line:4 char:18
+ $tmpSource = Get-Item $filSource
+ ~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\New\cpApplication.txt:String) [Get-Item], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetItemCommand
Get-Item : Cannot bind argument to parameter 'Path' because it is null.
At line:5 char:32
+ $tmpDestination = Get-Item $filDestination
+ ~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Get-Item], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.GetItemCommand
The property 'CreationTime' cannot be found on this object. Verify that the property exists and can be set.
At line:7 char:5
+ $tmpDestination.CreationTime = $tmpSource.CreationTime
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : PropertyNotFound
The property 'LastWriteTime' cannot be found on this object. Verify that the property exists and can be set.
At line:8 char:5
+ $tmpDestination.LastWriteTime = $tmpSource.LastWriteTime
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : PropertyNotFound
The property 'LastAccessTime' cannot be found on this object. Verify that the property exists and can be set.
At line:9 char:5
+ $tmpDestination.LastAccessTime = $tmpSource.LastAccessTime
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : PropertyNotFound