3
我是PowerShell的新手,我遇到了一个我无法处理的问题。 我必须让我的功能分析很多文件夹在一排,但是当我给的参数在我的功能我PROGRAMM不会工作...PowerShell - 无法识别功能
Param(
[string]$fPath
)
analyse $fPath
$importList = get-content -Path C:\Users\lamaison-e\Documents\multimediaList.txt
$multimediaList = $importList.Split(',')
function analyse{
Param(
[parameter(Mandatory=$true)]
[String]
$newPath
)
cd $newPath
$Resultat = "Dans le dossier " + $(get-location) + ", il y a " + $(mmInCurrentDir) + " fichier(s) multimedia pour un total de " + $(multimediaSize) + " et il y a " + $(bInCurrentDir) + " documents de bureautique pour un total de " + $(bureautiqueSize) + ". La derniere modification du dossier concerne le fichier " + $(modifDate)
$Resultat
}
它工作时,“分析” didnt存在,但停止工作只是之后。 CommandNoFoundException。这可能是一个愚蠢的错误,但我不能处理它...谢谢你的时间。
'function'是不是一个声明,它是一个命令,而必须执行创建/修改功能。 – PetSerAl