zoukankan      html  css  js  c++  java
  • Dos中常用的命令

    1.  重定向

    cmd >file                    standard output 重定向到file

    cmd 1> nul 2>&1        无输出.

    cmd 1> file 2>&1        standard output 重定向到file, standard error 重写向到 file.

    cmd 1>> file 2>&1      standard output 重定向到file, standard error 重写向到 file. 均为追加模式。

    2. findstr

    findstr /NI /C:": error " file           在File中搜索字符串": error ", 不区分大小写

    findstr /m /s /d:d:\ ".*" *.txt       搜索D盘下所有目录及子目录,显示所有match ".*"的txt文件的文件名

    if %ERRORLEVEL% == 0 goto ERROR

    3. if or not

    if not exist folder md folder           如果不存在folder, 则创建folder

    IF /I "%vv%"=="OK" (
    ...

    ) ELSE (

    ...

    )                                                 如果%vv%=="OK" (不区分大小写), 则...

  • 相关阅读:
    NACBD
    周总结7
    周总结6
    团队题目——TD课程通
    移动端疫情展示
    周总结5
    每周总结4
    每周总结3
    每周总结2
    求最大子数组
  • 原文地址:https://www.cnblogs.com/DataFlow/p/2480744.html
Copyright © 2011-2022 走看看