CMD command line the method for writing all file names of the current disk to a text file _dos/bat

Source: Internet
Author: User

Is there a way to get all the file names out of a disk at once? In addition to the batch get file name, of course, Windows itself can be achieved! Here's how to write all the file names of the disks to the text using the cmd command line.

Dir f:/> D:/1.txt//write directories under F disk into D:/1.txt
Dir d:/>> d:/1.txt//Add the directory under D disk to D:/1.txt
dir/s d:/Music > D:/1.txt//All information on the directory and subdirectory files of d:/music is established in D:/1.txt
DIR/S/b d:/Music > D:/1.txt//Set up d:/directory and subdirectory files with simplified information in d:/1.txt

tree/f d:/> D:/1.txt//d:/files and folders are created in the form of a tree in D:/1.txt.
Dir >> 1.txt//Create the current directory and append it to 1.txt in the current directory.

> Create Files
>> Create (if no files are available) or append (if there is already a file) to the file.

If we get a list of the contents of the current directory, generally use the following method:

Copy Code code as follows:

Div/b >dxy.txt

The effect is shown in the following illustration:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.