Win10 uses PowerShell to batch create new folders

  

We often need to organize documents during the process of using Win10 computer, then we need to create multiple folders for classification. It is very troublesome to create one by one, so is there any way to create new folders in batches? In fact, in the Win10 system, we can use the PowerShell that comes with the system to create new folders in batches. Let's take a look at it with Xiaobian.

Software Name:
Windows PowerShell (Monad) 2003 Windows Shell Command
Software Size:
12MB
updated:
2010-09-04


follows:

1, first found in the Windows start menu PowerShell, and click to open, as shown below:

2. Switch to the directory where you need to create a new folder by using the command. For the switch command, refer to the following figure:

PS: The command is not You can also switch without cooking. After moving, you can move directly to the target location.

3. After switching to the desired directory, use the following command to complete the batch creation:

mkdir $(1 ..10 |  %{"IThome$_"})

Note: In the above command, “1..10” is the serial number of the batch folder, indicating that the naming is an integer from 1 to 10. These numbers can be customized; the content inside the curly braces {} is the text before the serial number, which shows "IThome", and these words are also customizable, “$_” The number before the generation. As can be seen from the above figure, the number is replaced by “11..20”

After executing the command, you can get the following picture:

Tips: When copying and pasting the above commands, some versions of PowerShell may have display problems, so be sure to display them. If there is no problem with the text, execute the command (the cursor will be corrected to the wrong character), otherwise an error will be reported.

The above content is a small series for everyone to bring Win10 system using PowerShell batch new folder method, a very practical small skills, we must master! Hope can help everyone!

Copyright © Windows knowledge All Rights Reserved