Administrator
发布于 2025-04-02 / 1 阅读
0

Windows CMD 指令汇总

Windows CMD 命令汇总

  1. 查看当前目录下文件:dir
  2. 解压指令
    1. 解压.zip文件到当前目录:tar -xf 文件名
    2. 解压到指定目录‌:tar -xf 文件名.zip -C 目标路径
    3. 在 CMD 中可以直接调用 PowerShell 的 Expand-Archive 命令来解压 .zip 文件。
      1. powershell -command "Expand-Archive -Path '文件名.zip' -DestinationPath ."
      2. powershell -command "Expand-Archive -Path '文件名.zip' -DestinationPath '目标路径'"
  3. 删除非空文件夹
    1. rmdir /s 文件夹路径