Effacer les filtres
Effacer les filtres

PowerShell Command not working

6 vues (au cours des 30 derniers jours)
Brandon Free
Brandon Free le 8 Juin 2018
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 commentaire
Venkata Siva Krishna Madala
Venkata Siva Krishna Madala le 12 Juin 2018
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"

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Install Products dans Help Center et File Exchange

Tags

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by