SUPINFO International University

SUPINFO Institute of Information Technology
Laboratoire Microsoft




[Windows PowerShell] Créer un Nouveau fichier via PowerShell

Accueil > Script > windows_xp > [Windows PowerShell] Créer un Nouveau fichier via PowerShell

[Windows PowerShell] Créer un Nouveau fichier via PowerShell

Par Cedric NANA, LABORATOIRE SUPINFO DES TECHNOLOGIES MICROSOFT (EQUIPE RECHERCHE)
Publiée le 04/02/2007 vers 12h.

 On souhaite créer un fichier nommé hhilton.txt dans le répertoire : C:\temp via PowerShell. Rien de plus simple :

$file = new-item "C:\temp\hhilton.txt" –type file.

Note : on peut faire suivre la commande -force qui écrasera le fichier hhilton.txt si celui-ci est déjà présent.

$file = new-item "C:\temp\hhilton.txt" –type file -force.



Proposer un script

Notre avis :

Votre avis :

Réactions :
0

Votants :
13

Visites :
10602

1
2
3
4
5




Retrouvez ci-dessous les autres sections du Laboratoire Microsoft