📄 shift.ex2
字号:
SHIFT─例子
下面的批处理文件MYCOPY.BAT说明怎样用SHIFT命令处理任意多个命令行参
数,将一系列文件拷贝到一个指定的目录。使用的参数是目录名和后面的一系
列文件名。
@echo off
rem MYCOPY.BAT copies any number of files
rem to a directory.
rem The command uses the following syntax:
rem mycopy dir file1 file2 ...
set todir=%1
:getfile
shift
if "%1"=="" goto end
copy %1 %todir%
~w
goto getfile
:end
set todir=
echo All done
? @echo off
? rem MYCOPY.BAT copies any number of files
? rem to a directory.
? rem The command uses the following syntax:
? rem mycopy dir file1 file2 ...
? set todir=%1
? :getfile
? shift
? if "%1"=="" goto end
? copy %1 %todir%
? goto getfile
? :end
? set todir=
? echo All done
~w
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -