0
在下面的半僞代碼中,數組$system
中第一個元素的正斜槓總是作爲反斜槓讀取。轉義前斜槓問題
我嘗試了各種轉義字符,如`和\但無濟於事。這是PowerShell中的一個已知問題嗎?怎麼解決?
$system = @("Something/Anything", "Super Development","Quality Assurance")
//the following is looped with $y
$string| ConvertTo-json | FT | Out-File -append C:\Test\Results\$($system[$y])_All.csv
//error:
Message : Could not find a part of the path 'C:\Test\Results\Something\Anything_All.csv'
在Windows中,你不能在文件命名「/」使用! – autosvet
'$東西[$ Y]'似乎並沒有解決我 '$東西= '測試 - ' 的foreach($ Y $中的系統){$ 東西[$ Y] }' –
@HiteshDhruna什麼對不起,錯字。固定 – rafvasq