【问题标题】:How to install test command line如何安装测试命令行
【发布时间】:2014-03-06 12:26:09
【问题描述】:

我正在尝试使用test 命令,但它在我的系统中不存在(Windows 8)。

test -d $(build)

如何安装?

【问题讨论】:

    标签: powershell makefile mingw


    【解决方案1】:

    在 PowerShell 中,您可以使用 Test-Path cmdlet 检查文件夹是否存在:

    Test-Path -PathType Container -LiteralPath 'C:\some\folder'
    

    【讨论】:

      【解决方案2】:
      @echo off
      IF exist myDirName ( echo myDirName exists ) ELSE ( mkdir myDirName && echo myDirName created)
      

      来源 => Here

      【讨论】:

      • 我有一个makefile,我正在尝试使用“test”命令检查一个目录是否存在。但是我的系统没有。
      • Cygwin 可能是个坏主意,在这里我找到了有类似问题的人,告诉我是否有帮助!
      猜你喜欢
      • 1970-01-01
      • 2015-09-25
      • 1970-01-01
      • 2012-04-01
      • 1970-01-01
      • 2017-04-19
      • 2012-03-08
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多