I put a script where a varibale is processed and then passed on to a command within the same script, the issue is that this command fails because it does not take the variabe , but i know for sure that the varibale has the right value, can somebody please explain to me what is wrong\missing, example below
to run the above " script /vol/vol1/qt1/username username "
the output is
so $q fails because $ql is empty, and I can not figure out why, $pathd is correctly processed and its value is " /vol/vol1/qt1/"
qline.txt contains the lines below
Dave Wyatt: Edit: Moved to PowerShell Q&A Forum.
$pathd = $path.Replace($user," ")
replaces the value of $user with a single space character inside $path. In your commented out line of
There is no space character. That is important; the whitespace becomes part of the pattern.
thanks very much, i replaced that line with "$pathd = $path -replace $user" and my script works fine, many thanks again
You must be logged in to reply to this topic.