标签: powershell powershell-v2.0
我有一个powershell脚本循环输入并创建输出
$output | Out-File -Filepath C:\Users\Soc.20150119_output.txt -append
显然,如果你运行两次,它会将它附加到已经存在的文件中。我在这里搜索过,但是每次脚本运行时我都找不到解决方法如何始终写入新文件。
感谢您的帮助!
编辑:我逐行添加内容。因此,删除-append不是解决方案。