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.