Tag:create folder

  • Bat batch implementation of the creation of 10 folders, the folder contains 5 empty folder

    Time:2021-3-24

    Copy codeThe code is as follows: @echo off for /l %%i in (1,1,10) do ( for /l %%j in (1,1,5) do md %%i\%%j 2>nul ) pause The last “2 > nul” note is to block the error message – if there is a folder with the same name, the error message will not be displayed.

  • DOS create folder MD

    Time:2021-3-1

    If you want to create a folder with spaces or &, you need to use quotation marks to enclose the folder name, for example: MD “test ABC”, MD “ABC & XYZ”. What happens if you don’t use quotation marks? The results are as follows 1. If the folder name has spaces, the MD test ABC […]

  • Examples of creating files and contents of shell

    Time:2020-9-4

    Shell creation folder: [[email protected] shell_command]# vi ./mkdir.sh #!/bin/sh parentDir=”/media/sf_Project/self/smarty-frame/application/$1″ fileName=$2 dirAndName=$parentDir/$fileName if [ ! -d “$dirAndName” ];then mkdir $dirAndName Echo “folder created successfully” else Echo “folder already exists” fi [[email protected] shell_command]# cat ./mkdir.sh #!/bin/sh parentDir=”/media/sf_Project/self/smarty-frame/application/$1″ fileName=$2 dirAndName=$parentDir/$fileName if [ ! -d “$dirAndName” ];then mkdir $dirAndName Echo “folder created successfully” else Echo “folder already exists” fi […]

  • Nested Creation Folder Instructions under CentOS

    Time:2019-10-2

    How many folders can you create nested under centos? This is a homework that the teacher left us to think about, so we kept on mkdir, mkdir, and finally found that it was not manual. So I wrote a script file to execute automatically. The code is as follows: 1#!/bin/bash//Definition is executed by bshell 2 […]