Batch save the file names of a folder to a text document, and use the system's built-in DOS to complete this task.
Procedure:
1. Enter the Command Prompt window
2. Enter drive D:
3. Enter the command DIR/S/on/B> D:/abc.txt
Command details:
Dir: list file tables.
/S is used to list all the files in the subdirectory in the current directory. The file size and modification date are displayed.
/On is used to specify that the files in the folder are sorted by name.
/B is used to generate a "pure" file name list, without showing the file size and modification date.
> Is used to specify the location where the command line output results are stored.
D:/abc.txt: Save the name of the file to the abc.txt file.
The PS:> character can also be replaced by>.
If the hosts file name .txt does not exist, >>create a new file;
If the hosts file name .txt already exists,> append the content to the file,> overwrite the original content.
How to export the file directory tree in Windows
Use the Tree Command in MS-dos:
1. Enter "cmd" in "run" of windows to enter the Command Prompt window (similar to the DOS Interface)
2. Enter D: To enter the drive for listing the Directory
3. Enter the folder name to enter the folder for listing the directory.
4. Tree/F> file name (for example, daochu.txt)
5.search for the output file daochu.txt in drive C, which is the desired file directory tree.
Supplement:
Tree/f/A> file name (use ASCII to export, you can achieve tree)
Tree /? (View help)
The format of the Tree Command is tree [Drive] [path] [/F] [/A].
/F: display the name of the file in each folder
/A uses ASCII characters instead of extended characters
You can click "tree/?" In the command line window /?" View help.
Format: Tree [drive letter:] [f] [> PRN]
When the/F parameter is used, all directories and all files under the directory are displayed. If this parameter is omitted, only directories are displayed, but files under the directory are not displayed;
When the> PRN parameter is selected, the listed directory and the file name in the directory are printed and output.
Example: tree/F> tree.txt