dir/b > files.txt
I guess it has to be done in PowerShell to preserve unicode signs.
Get-ChildItem | Select-Object -ExpandProperty Name > files.txt
or shorter:
ls | % Name > files.txt
However, you can easily do the same in cmd
:
cmd /u /c "dir /b > files.txt"
The /u
switch tells cmd
to write things redirected into files as Unicode.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With