am having same issue with following code
Get-ChildItem –Path ‘R:\EDI_Development\Documentation\MacessEXP\Scripting\*’ –Recurse -Include TestPlan.doc | ForEach-Object { Copy-Item -Path $_.FullName -Destination "C:\job\j scrippt to VB script\New folder" –$_.FullName –“TestPlan.doc"}
I get all the correct answer upto bold script afte that it fails at Foreach
what should I do ?
but when I echo above scrip I received following script:
PS C:\> Get-ChildItem -Path
`R:\EDI_Development\Documentation\MacessEXP\Scripting\*' -Recurse -Include
TestPlan.doc | ForEach-Object { Echo $("C:\job\j scrippt to VB
script\New folder" +$_.FullName +"TestPlan.doc") }
C:\job\j scrippt to VB script\New
folderR:\EDI_Development\Documentation\MacessEXP\Scripting\v1.1.1
MBS200711060001 Pcp
Change\TestPlan.docTestPlan.doc
C:\job\j scrippt to VB script\New
folderR:\EDI_Development\Documentation\MacessEXP\Scripting\v1.1.2 HEAT00613656
return
mailing address if present, otherwise default
address\TestPlan.docTestPlan.doc
C:\job\j scrippt to VB script\New
folderR:\EDI_Development\Documentation\MacessEXP\Scripting\v1.1.3 HEAT00630892
fix st
ale data\TestPlan.docTestPlan.doc
C:\job\j scrippt to VB script\New
folderR:\EDI_Development\Documentation\MacessEXP\Scripting\v1.2.0
MBS200712130001 Ale
rt if SF in Queue\TestPlan.docTestPlan.doc
C:\job\j scrippt to VB script\New
folderR:\EDI_Development\Documentation\MacessEXP\Scripting\v1.3.0 part of MARS
progra
mming request\TestPlan.docTestPlan.doc
C:\job\j scrippt to VB script\New
folderR:\EDI_Development\Documentation\MacessEXP\Scripting\v1.3.1 HEAT00835787
F6 key
Claim Explanation Code not
working\TestPlan.docTestPlan.doc
C:\job\j scrippt to VB script\New
folderR:\EDI_Development\Documentation\MacessEXP\Scripting\v1.3.2 HEAT00853072
Securi
ty check termed spans\TestPlan.docTestPlan.doc
C:\job\j scrippt to VB script\New
folderR:\EDI_Development\Documentation\MacessEXP\Scripting\v1.3.3 HEAT01003331
Add DO
M mapping for new Service Form template -
iERP\TestPlan.docTestPlan.doc
C:\job\j scrippt to VB script\New
folderR:\EDI_Development\Documentation\MacessEXP\Scripting\v1.3.6 HEAT01266222
Add Ne
w Contact Info to Service
Form\TestPlan.docTestPlan.doc
C:\job\j scrippt to VB script\New
folderR:\EDI_Development\Documentation\MacessEXP\Scripting\v1.x.x [on hold]
HEAT00765
101 Workflow Tracking Report Slowness\TestPlan.docTestPlan.doc