LIST.TXT" in the notepad file. The third step is to change the suffix name of this notepad file from "txt" to "bat". A rename dialog box will pop up, click "Yes". Step 4: Double-click the file "New Text Document.b""/> LIST.TXT" in the notepad file. The third step is to change the suffix name of this notepad file from "txt" to "bat". A rename dialog box will pop up, click "Yes". Step 4: Double-click the file "New Text Document.b"">
Home > Article > Computer Tutorials > Extract file names in folders in batches, read file names in batches
Do you need to batch extract the names of files in folders? The need to read file names is very common these days, and whether it is used to organize data, create directories, or perform other tasks, extracting file names in batches is an essential skill. This article will provide you with a detailed step-by-step guide on how to extract file names from a folder using PHP code. Read on to learn how to easily batch read file names and solve your file management woes.
Sometimes it is necessary to extract some file names, but there are too many files, and copying them one by one is too slow. Now I will talk about using batch processing commands to batch extract file names in folders.
For example, there are many files in a computer folder, and you want to batch extract all the file names under this folder into a notepad file, without having to rename, copy or type by hand.
#The first step is to create a new notepad file in txt format in the folder to be extracted.
The second step is to enter: "DIR *.* ?/B >LIST.TXT" in the notepad file.
The third step is to change the suffix name of this notepad file from "txt" to "bat". A rename dialog box will pop up, click "Yes".
The fourth step is to double-click the file "New Text Document.bat" to generate the list.txt file. Open the txt file and you can see a list of all file names in the current folder. (Warm reminder: You can also put the file "New Text Document.bat" in other folders and run it to get all the file names under the current folder!)
The method of extracting the file name in the folder is to save the file to the directory where the file name is to be extracted, save it as *.bat (* is the file name), and then double-click to execute it. Isn’t it convenient, fast and practical? For more computer knowledge, please pay attention to 20HN~
The above is the detailed content of Extract file names in folders in batches, read file names in batches. For more information, please follow other related articles on the PHP Chinese website!