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