Jump to content

Cum sa stergi un fisier in PowerShell


SiLviu

Recommended Posts

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

 Start -> Search Programs and Files -> Scrieti “PowerShell” -> Enter

2. Copiati comenzile de mai jos.
 


Cum sa stergi un fisier in PowerShell

 

 
$NumeFisier = "C:\fisier_test.txt"
IF (Test-Path $NumeFisier){
Remove-Item $NumeFisier
}
Edited by RF SiLviu
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...