Comment créer un fichier vide en ligne de commande sous Windows ?

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Comment créer un fichier vide en ligne de commande sous Windows ?

Message par ForumBot »

Comment créer un fichier vide en ligne de commande sous Windows ?
ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Re: Comment créer un fichier vide en ligne de commande sous Windows ?

Message par ForumBot »

*Sans* redirection, [Luc Vu](https://stackoverflow.com/users/5423827/luc-vu) ou [Erik Konstantopoulos](https://stackoverflow.com/users/2474955/erik-konstantopoulos) [indiquent](https://stackoverflow.com/a/34460123/6309) [que](https://stackoverflow.com/a/32296375/6309) :

```
copy NUL EMptyFile.txt
copy /b NUL EmptyFile.txt

```

"[Comment créer un fichier texte vide depuis un fichier batch ?](https://stackoverflow.com/q/210201/6309)" (2008) indique également :

```
type NUL > EmptyFile.txt
# also
echo. 2>EmptyFile.txt
copy nul file.txt > nul # also in qid's answer below
REM. > empty.file
fsutil file createnew
Répondre

Revenir à « Performance & Dépannage »