Generate text file of all items in a folder in Windows 10

Опубликовано: 04 Октябрь 2024
на канале: JFLHV
2,280
11

Using the cmd prompt in Windows to create a text file of all items in a folder i.e: C:\Program Files

Read from specified path and save to current directory
dir /s /b “C:\Program Files” greaterthanarrow filename.txt

Save to specified path.
dir /s /b “C:\Program Files” greaterthanarrow “E:\My Info\filename.txt”

Read from current directory
dir /s greaterthanarrow filename.txt

Show summary and header info
dir /s “C:\Program Files” greaterthanarrow filename.txt

Show only files using the attribute option /a
dir /s /b /a:-d “C:\Program Files” greaterthanarrow filename.txt