1
我要拆分的文本"Account D:\Bank\Account"
與white space
文本,所以零件會Account
和D:\Bank\Account
,但出現一些錯誤信息,有什麼問題呢?不能分割以空格
這裏是我的代碼
$Path_info = "Account D:\Bank\Account"
$Account = $Path_info.Split(" ")
write-host $Acoount[0]
錯誤信息
嘗試沒有錯字'write-host $ Account [0]';) –
使用[嚴格模式](http://technet.microsoft.com/en-us/library/ff730970.aspx)來檢測錯字在變量名稱,不存在的屬性和whatnot。 – vonPryz