Jump to content


Photo

Cum sa stergi un fisier in PowerShell


  • This topic is locked This topic is locked
No replies to this topic

#1
TRACK)(

TRACK)(

    V.I.P

  • Posts
    2,428
  • Topics
    152
  • Reputation
    1988
  • Online
    37 days

powershell1.jpg

 

O comanda simpla de PowerShell prin care verificam daca exista un fisier anume, apoi il stergem.
 
 
1. Deschideti PowerShell:
 
a ) Start -> Programs -> Accesories -> Windows PowerShell
 
sau
 
b ) Start -> Search Programs and Files -> Scrieti “PowerShell” -> Enter
 
2. Copiati comenzile de mai jos.
 
$NumeFisier = "C:\fisier_test.txt"
IF (Test-Path $NumeFisier){
Remove-Item $NumeFisier
}

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users