⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 shift.ex2

📁 DOS学习程序 (非常好的模拟DOS程序)纯绿色版
💻 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 + -