Is there a way to get all the file names on a disk at once? In addition to batch file name acquisition, of course, Windows itself is also achievable! Now let’s teach you how to use the CMD command line to write all file names to text on disk.
Dir f:/> d:/1.txt//Write the directory under f disk into d:/1.txt
Dir d:/> d:/1.txt//Append directories on D disk to d:/1.txt
Dir/s d:/music> d:/1.txt//all information of d:/music directory and subdirectory files is established in d:/1.txt
Dir/s/b d:/Music > d:/1.txt//Build the directory and subdirectory files of d:/Music in d:/1.txt to simplify the information.
Tree/f:/> d:/1.txt//Create d:/1.txt files and folders in the form of trees.
Dir > > 1.txt // Create and append the current directory to 1.txt of the current directory.
> Create files
Create (if there is no file) or append (if there are already files) to the file.
If we get a list of contents in the current directory, we usually use the following method:
The effect is as follows: