The 12th IEEE International Conference on Communication Systems and Projects
win-powershell的基本命令和编写语法
Posted on
常用命令
创建目录、列出目录内项目、更改当前目录
1 2 3
mkdir <newfolder> dir cd <newfolder>
输出信息
1
echo "Hello world"
1 2 3 4 5
REM 这是一个注释信息 REM 不显示后续和当前命令行 @echo off REM 调用test.bat call c:\test.bat
一些语法
示例
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
@REM creat @REM first parameter is layout ,second parameter is title @echo off
set tempvar1=%1 ifdefined tempvar1 goto creat echo "ERROR: Missing Title" exit REM :creat set tempvar2=%2 ifdefined tempvar2 goto Layout hexo new post %tempvar1% && code .\source\_posts\%tempvar1%.md exit :Layout hexo new post %tempvar1%%tempvar2% && code .\source\_posts\%tempvar1%.md exit