Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Problem with my function's parameters.

$
0
0

Hi Guys,

Sorry for my poor english, i'm french.

I've a problem with a simple copy function like this one:

 

Copie ('C:\TEST''E:\Name\SVG\')$TotalFiles
$TotalFolderfunction Copie{param([string]$Source, [string]$Destination)Copy-Item $Source $Destination -Force -Recurse
$TotalGCI $Destination -Recurse -Forceforeach ($File in $Total){    if(!$File.Directory){    $TotalFiles+=1    }    Else    {    $TotalFolder+=1    }
}
}

I've the next error message:
"Copy-Item : Impossible to find the following path «C:TEST E:NomPcSVG», 
it doens't exist." 

I don't know why, for PS my argument $Source= C:TEST E:NomPcSVG et my argument $Destination = "nothing"
and yet there is a "," in my "param". 
Thank's for your help.

Viewing all articles
Browse latest Browse all 6937

Trending Articles