How to extract all file names from a folder

Source: Internet
Author: User

How to extract all file names from a folder:

Sometimes we want to organize all the file names in a folder into a file that is easy to manage and query and print, mostly by using the copy and Paste methods (renaming files in a folder, copying them in an editable state, and pasting them in other documents). This approach works, but with a large number of files in the folder, the work efficiency is low and must be checked after it is done.

The use of DOS redirection command "" "Plus Excel reference external data function can be easily and quickly implemented.

Suppose we want to extract all the file and folder names under the Windows directory under C disk.

1th step: In DOS or Windows 98 MS-DOS mode, enter the following command: C:windowsdir〉d:1.txt (carriage return)

2nd step: Open a new Excel XP spreadsheet, click the Data Drop-down menu in the toolbar, select Import external data → import data command, open the Import Data dialog box, locate the 1.txt document under D disk in Look in, click Open, and enter Text Import Wizard-3 Step 1.

Step 3rd: Select separator symbol in the original data type radio box and press next to enter the Text Import Wizard-3 steps 2.

Step 4th: In the Separator symbol check box, select "Semicolon, comma, space, other", and in the space after "other", press "next" to enter the Text Import Wizard-3 steps 3.

Step 5th: Click Finish, the Import Data dialog box appears, and then press OK when you select the existing sheet radio box.

Here, you should be able to see 8 columns of data, the first column is the "filename." However, the Chinese file name for the display of the dir command displays only 3~4 characters, and take a look at the 7th column (g column) and all the full file names are here (Figure 4)! The 8th column is the suffix of the filename, which is easy to filter (for Excel 2000, the difference is under the data Drop-down menu in the toolbar, The "Get External Data/Import text file" command is selected.

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.