Home Computer Tutorials Computer Knowledge How to skillfully create folders in batches using the command prompt

How to skillfully create folders in batches using the command prompt

Jan 11, 2024 pm 05:48 PM
Create using command prompt

How to skillfully create folders in batches using the command prompt

How to create folders in batches using the command prompt

These are just basic applications of command prompt tools, but in special cases, it can improve work efficiency, such as batch creation of folders.

Create Deep Folder

In Windows Explorer, to create a multi-level folder "a\b\c\d", four folder creation operations are required. However, with Command Prompt, you can accomplish this task by just entering a single command.

First, click "Start - All Programs - Accessories - Command Prompt", or press the shortcut key "Win R", then enter "cmd" and run to open the "Command Prompt" window. Next, type the following command.

md f:\a\b\c\d

After pressing the Enter key, a subfolder named "a" will be created under the F drive. Then, a subfolder named "b" will be created under the "a" folder. By analogy, multi-level folders can be created in sequence. Remember to add a half-width space bar after using the md command.

Create multiple folders

If you need to create 4 folders named "a", "b", "c", and "d" respectively in a certain directory, you can quickly achieve it through the following command: Open in the target folder Command line window and enter the command "mkdir a b c d". In this way, these four folders can be created at the same time.

You can also execute this command by entering the directory, such as "md f:\a f:\b", which will create folders named "a" and "b" respectively under the F drive.

For the convenience of explanation, the examples in the text are all in English. You can enter Chinese as needed, so that you can create a folder with a Chinese name.

Create command prompt switch wifi

@echo off

echo.&echo.

echo Wifi Startup Assistant

echo.&echo.

echo [ Y=on ] [ N=off ]

echo.&echo.

set/p a=Please enter the command:

if %a%==Y pause>nul&goto b

if %a%==N pause>NUL&GOTO a

:b

netsh wlan set hostednetwork mode=allow ssid=wifiname key=wifipassword

netsh wlan start hostednetwork

:a

netsh wlan stop hostednetwork

netsh wlan set hostednetwork mode=disallow

Change the ssid and password yourself.

How to create a computer user using CMD

Enter the following command at the MS-DOS prompt: "net user john 123 /add" and press Enter. You can create a new user named "John" with the password "123".

The Add parameter indicates a new user.

Create a user with limited login time

Use the following methods to control computer usage time. For example, you need to create a user account for John with a password of "123" and login permissions from 8 a.m. to 10 p.m. from Monday to Friday and from 7 p.m. to 9 p.m. on weekends.

1. For the 12-hour clock, type the following command: "net user john 123 /add /times:monday-friday,8AM-10PM;saturday-sunday,7PM-9PM" and press Enter to confirm.

2. For 24-hour format, you can type the following command: "net user john 123 /add /times:M-F,8:00-22:00;Sa-Su,19:00-21:00" and press Enter to confirm. Can.

It is worth noting: The increase value of Time is limited to 1 hour. For Day values, you can use the full name or abbreviation (i.e. M, T, W, Th, F, Sa, Su). Either 12-hour or 24-hour time notation can be used. For 12-hour notation, use AM, PM or A.M., P.M. An All value means the user can always log in; an empty value (blank) means the user can never log in. Use commas to separate days and times, and semicolons to separate days and time units (for example, M, 4AM-5PM; T, 1PM-3PM). Do not use spaces when specifying time.

In addition, the Passwordchg:{yesno} parameter can be used to specify whether users can change their passwords. The default setting is Yes.

If used without parameters, Net User will display the list of users on the computer. For example, type the following command: "net user" and press Enter to display all users of the system.

If you type: "net user john" and press Enter, user John's information will be displayed.

If you type the command: "net user john 123456 /add" and press Enter to confirm, the password of user John (John is an existing user) will be forcibly changed to 123456.

If you type the command: "net user john /delete" and press Enter to confirm, user John can be deleted

The above is the detailed content of How to skillfully create folders in batches using the command prompt. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1669
14
PHP Tutorial
1273
29
C# Tutorial
1256
24
Fixdisk Windows 7: Check Your Hard Disk for Errors on Windows 7 Fixdisk Windows 7: Check Your Hard Disk for Errors on Windows 7 Apr 14, 2025 am 12:40 AM

If you suspect your hard drive encounters issues, you can check the drive for errors on Windows 7. This php.cn post talks about fixdisk Windows 7. You can follow the guide to check the hard drive for errors on Windows 7.

Effortles Fixes for Black Screen After Installing a Graphics Driver Effortles Fixes for Black Screen After Installing a Graphics Driver Apr 15, 2025 am 12:11 AM

Have you ever encountered a black screen after installing a graphics driver like an Nvidia driver in Windows 10/11? Now in this post from php.cn, you can find a couple of worth trying solutions to the Nvidia driver update black screen.

KB2267602 Fails to Install: Here Is How to Fix It! KB2267602 Fails to Install: Here Is How to Fix It! Apr 15, 2025 am 12:48 AM

KB2267602 is a protection or definition update for Windows Defender designed to fix vulnerabilities and threats in Windows. Some users reported that they were unable to install KB2267602. This post from php.cn introduces how to fix the “KB2267602 fai

Difference Between RAID Recovery and Hard Drive Recovery Difference Between RAID Recovery and Hard Drive Recovery Apr 17, 2025 am 12:50 AM

Data recovery is always a heated topic. To successfully restore data from your device, you should know how it stores data. You can learn the difference between RAID recovery and hard drive recovery from this php.cn post.

How to Fix the File System Error (-1073741521) in Windows? - MiniTool How to Fix the File System Error (-1073741521) in Windows? - MiniTool Apr 16, 2025 am 12:37 AM

File system errors commonly happen on people’s computer and the error can trigger a series of linked malfunctions. This article on php.cn Website will give you a series of fixes to targeting the file system error (-1073741521). Please keep on with yo

Fix Security Tab Not showing in Folder Properties Windows 11 Fix Security Tab Not showing in Folder Properties Windows 11 Apr 17, 2025 am 12:36 AM

The Security tab in File Properties helps set different permissions for different groups and users to a file or folder. Some users find that Windows 11 Security tab missing from File Properties. This post from php.cn gives some methods to fix it.

Community Tips for Black Folder Background Windows 10/11 Community Tips for Black Folder Background Windows 10/11 Apr 15, 2025 am 12:40 AM

Seeing a black folder background Windows 10/11 when you open File Explorer? In this post from php.cn Solution, you will learn a couple of useful solutions to remove the black background in folders.

The File Can't Be Displayed in OneDrive - How to Resolve It? The File Can't Be Displayed in OneDrive - How to Resolve It? Apr 18, 2025 am 12:47 AM

Are you struggling with the “the file can’t be displayed” error when accessing the specific folder? Some users are complaining about this trouble and looking for useful measures. This article about the file can’t be displayed OneDrive from php.cn wil

See all articles