Hi,
I'm writing a script to move files. Therefore I need some information from a xml file. Everything works fine, except of one thing:
The command:
$a=0; Do{move-item \\servername\dir\$exconfig.Objs.Lokationen.Name[$a] $e
xconfig.Objs.Lokationen.Share[$a]; $a++} While($a -lt $lines.Lines)
gives this error back:
Exception retrieving string: "Cannot find an overload for "XmlNode" and the argument count: "3"."
At line:1 char:10+ $a=0; Do{m <<<< ove-item \\servername\dir\$exconfig.Objs.Lokationen.Name[$a] $exconfig.Objs.Lokationen.Share[$a]; $a++} While($a -lt $lines.Lines)
The strange thing is, that the command:
$a=0; Do{$exconfig.Objs.Lokationen.Name[$a],$exconfig.Objs.Lokationen.Share[$a];$a++} While($a -lt $lines.Lines)
works perfectly.
Of course I've already tried the first command with a while loop, but it doesn't work.
Do you have any suggestions?
Thanks in advance.
Greets ahofer