Windows common commands (file operations Chapter)

Source: Internet
Author: User

  • Toggle Drive Letter:
    根目录:d:上级目录:cd  ..相对路径:cd  test绝对路径:cd  c:\test查看当前目录:echo  %cd%
  • To view files/folders:
    不含隐藏文件:dir隐藏文件:dir  /a排序:dir  /on
  • Show/Hide files/folders:
    隐藏:attrib  +h  test显示:attrib  -h  test
  • To create a file:
    空文件:echo.  >  test.txt带内容:echo  abc  >  test.txt
  • To create a folder:
    单个文件夹:md  test多个文件夹:md  test1  test2多级目录:md  test1/test2/test3...
  • To copy a file:
    单个:copy  /y  a.txt  a.txt.back多个:copy  /y  *.txt  *.txt.back
  • To copy a folder:
    不含隐藏文件:xcopy  test1  test2隐藏文件:xcopy  /h  test1  test2
  • To delete a file:
    单个:del  /q  a.txt多个:del  /q  *.txt
  • To delete a folder:
    rd  /s  /q  test
  • To rename a file/folder:
    单个:move  a  aa多个:ren  *.txt  *.bat
  • Move files/folders:
    move  /y  test1  test2
  • Find/Statistics Files:
    显示行号:find  /n  "str"  test.txt统计行数:find  /c  "str"  test.txt查看文件内容:findstr  "."  test.txt
  • Windows common commands (file operations Chapter)

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.