Easily create catalogs with BAT batches

  

For software geeks such as Master Dong, downloading all kinds of novel and useful software from major websites is almost a daily thing to do, long-term, hard disk More and more software. However, when we need to use a certain software, we often can't find the location of the software on the hard disk. If we build a large software catalogue in advance and store the software in categories, it is much more convenient to find the software later. However, such a software catalogue generally contains multiple folders, newly created folders and renamed. If all the work is done manually, the workload is too large. How can we solve this thorny problem? Below, I will introduce you to a "large lazy approach" using a batch command to quickly create a standard large software catalog.

Step 1: First create a folder named “Software Download” in the root directory of a partition with a large hard disk space (such as E disk), and then enter some in the address bar of IE. The address of the software classification page of the website, such as the software classification page of Sky Software Station www.skycn.com/sort/soft_sort.html, press Enter, and then click the menu <; File → Save As & rdquo; command to save this page For a text file, save it to the “E: Software Download” directory, the file name is “Software Category.txt”.

Step 2: Open the <quo;software category directory.txt” file, delete the extra text and spaces in this text file that are not related to the software category, and then enter the left side of each category of software category name. Enter the number 1 and press the space bar (Figure 1). After editing, save the changes made to the text file.
Figure 1

Step 3: Create a new batch file named "Software Category", which reads as follows:

@echo off set root=%cd% Setlocal ENABLEDELAYEDEXPANSION for /f "tokens=*" %%i in (software category directory.txt) do (set list=%%i set new=md !list! if "!list:~0,1!" ;=="1" cd %root% & md !list:~2! & cd !list:~2! & set new= !new! )

After the above content is entered, Save this batch file to the “E: Software Download” directory, and finally double-click to run it, you can generate a standard large software catalogue under the “E: Software Download” directory (Figure 2). ), open any of the directories in Figure 2 (such as "network software", you will find that there are some subdirectories created under the category A in Figure 1 as the classification criteria. In this way, when we download the software later, we only need to check the number and save the software to the corresponding directory.

Figure II

Copyright © Windows knowledge All Rights Reserved