Reputation: 2861
I want to split the text "Account D:\Bank\Account"
with white space
, so the parts will be Account
and D:\Bank\Account
, but it appear some error message , what's the problem?
here is my code
$Path_info = "Account D:\Bank\Account"
$Account = $Path_info.Split(" ")
write-host $Acoount[0]
error message
Upvotes: 1
Views: 63
Reputation: 27132
You have a typo in
write-host $Acoount[0]
should be
write-host $Account[0]
Except for this, your code works fine.
Upvotes: 1