C:\test我的目标是在名为 的日志文件中显示目录中的项目log.txt,而不显示找到的文件的文件扩展名,例如.zip、.pdf等。
C:\test
log.txt
.zip
.pdf
到目前为止我的脚本:
Get-ChildItem -Path C:\Test\ -name |Out-File C:\test2\log.txt
如何使.log文件不显示文件夹中找到的文件的扩展名C:\test?
.log
powershell
powershell ×1