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 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)

How do I edit the Registry? (Warning: Use with caution!) How do I edit the Registry? (Warning: Use with caution!) Mar 21, 2025 pm 07:46 PM

Article discusses editing Windows Registry, precautions, backup methods, and potential issues from incorrect edits. Main issue: risks of system instability and data loss from improper changes.

How do I manage services in Windows? How do I manage services in Windows? Mar 21, 2025 pm 07:52 PM

Article discusses managing Windows services for system health, including starting, stopping, restarting services, and best practices for stability.

How to Fix the Steam Cloud Error? Try These Methods How to Fix the Steam Cloud Error? Try These Methods Apr 04, 2025 am 01:51 AM

The Steam Cloud error can be caused by many reasons. To play a game smoothly, you need to take some measures to remove this error before you launch the game. php.cn Software introduces some best ways as well as more useful information in this post.

Windows Metadata and Internet Services Problem: How to Fix It? Windows Metadata and Internet Services Problem: How to Fix It? Apr 02, 2025 pm 03:57 PM

You may see the “A connection to the Windows Metadata and Internet Services (WMIS) could not be established.” error on Event Viewer. This post from php.cn introduces how to remove the Windows Metadata and Internet Services problem.

How do I change the default app for a file type? How do I change the default app for a file type? Mar 21, 2025 pm 07:48 PM

Article discusses changing default apps for file types on Windows, including reverting and bulk changes. Main issue: no built-in bulk change option.

How to Resolve the KB5035942 Update Issues – Crashing System How to Resolve the KB5035942 Update Issues – Crashing System Apr 02, 2025 pm 04:16 PM

KB5035942 update issues - crashing system commonly happens to users. Inflicted people hope to find a way out of the kind of trouble, such as crashing system, installation, or sound issues. Targeting these situations, this post published by php.cn wil

How do I use the Group Policy Editor (gpedit.msc)? How do I use the Group Policy Editor (gpedit.msc)? Mar 21, 2025 pm 07:48 PM

The article explains how to use the Group Policy Editor (gpedit.msc) in Windows for managing system settings, highlighting common configurations and troubleshooting methods. It notes that gpedit.msc is unavailable in Windows Home editions, suggesting

How to Use Chris Titus Tool to Create a Debloated Win11/10 ISO How to Use Chris Titus Tool to Create a Debloated Win11/10 ISO Apr 01, 2025 am 03:15 AM

Chris Titus Tech has a tool called Windows Utility that can help you easily create a debloated Windows 11/10 ISO to install a clean system. php.cn offers a full guide on how to do this thing using the Chris Titus tool.

See all articles