Warning: Use of undefined constant PRIMA_PAGINA - assumed 'PRIMA_PAGINA' (this will throw an Error in a future version of PHP) in /home/vhosts/situlmeu.eu5.org/index.php on line 2
Cum sa stergi un fisier prin PowerSheell

Cum sa stergi un fisier in PowerShell

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.

1
2
3
4
$NumeFisier = "C:\fisier_test.txt"
IF (Test-Path $NumeFisier){
Remove-Item $NumeFisier
}
Inapoi


Free Web Hosting