C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command Get-ChildItem -File D:\__Temp\123\2 - Copy -Recurse -Filter *.dcm | ForEach-Object { '' + $_.FullName + '' } | Out-File -FilePath D:\Temp\scan.txt -Append -Encoding UTF8
我已经试着在路径周围使用了几个“或”,但似乎没有任何效果,shell只是在没有filewrite的情况下立即退出。
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command Get-ChildItem -File 'D:\__Temp\123\2 - Copy' -Recurse -Filter *.dcm | ForEach-Object { '' + $_.FullName + '' } | Out-File -FilePath D:\Temp\scan.txt -Append -Encoding UTF8
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command Get-ChildItem -File "D:\__Temp\123\2 - Copy" -Recurse -Filter *.dcm | ForEach-Object { '' + $_.FullName + '' } | Out-File -FilePath D:\Temp\scan.txt -Append -Encoding UTF8