필터 지우기
필터 지우기

PowerShell Command not working

조회 수: 6 (최근 30일)
Brandon Free
Brandon Free 2018년 6월 8일
I have a powershell command that removes lines from a large text file to make it a more manageable size. When I try to run it in MATLAB it gives an error
!powershell Get-Content oldfile.txt | Where {($_.ReadCount % 1000) -eq 0}|Set-Content newfile.txt
'Set-Content' is not recognized as an internal or external command,
operable program or batch file.
Any ideas how I can fix this?
  댓글 수: 1
Venkata Siva Krishna Madala
Venkata Siva Krishna Madala 2018년 6월 12일
As posted by Kojiro Saito you have to put the command between double quotes.
!powershell "Get-Content oldfile.txt | Where {($_.ReadCount % 1000) -eq 0} | Set-Content newfile.txt"

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Install Products에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by