Batch 脚本中使用 IF EXIST 语句时,总是提示

The syntax of the command is incorrect.

原始 bat 脚本如下:

ECHO OFF
SET project="C:\Temp" IF EXIST %project%\build.log(
ECHO File found
)ELSE(
ECHO File missing
)

原因是遗漏了起关键作用的 空格

ECHO OFF
SET project="C:\Temp" REM There must be a space placed before the parenthesis (
REM 圆括号 ( 前要留有一个空格。
IF EXIST %project%\build.log (
ECHO File found
) ELSE (
ECHO File missing
)

IF EXIST: The syntax of the command is incorrect.的更多相关文章

  1. windows 8 安装 oracle 11g 报错:command line option syntax error,type command/? for help

    windows 8 安装 oracle 11g 报错:command line option syntax error,type command/? for help 在windows8操作系统上安装 ...

  2. 安装SQL Servre2000时提示“command line option syntax error! type command /? for help”

    问题: 当程序正在安装ms数据访问组件时,弹出错误提示框:command line option syntax error,type command/? for help,点击确定继续:到了程序正在安 ...

  3. Command line option syntax error. Type Command /? for Help.

    --------------------------- Microsoft Visual C++ 2005 Redistributable --------------------------- Co ...

  4. 解决安装vc2005运行库时提示Command line option syntax error.Type Command/?for Help

    安装vc2005运行库时提示 这是因为它要自解压到用户的临时文件夹下,如果用户名中带中文,就会报错. 简单的解决方法是,手动解压之,再安装 当然,你也可以修改用户名或者再新建个用户.

  5. 创建pathing jar

    pathing jar是一个特殊的jar: 该jar文件只包含manifest.mf文件 该manifest文件只包含Class-Path,列出了所有需要真正加到classpath中的jar,或者di ...

  6. Windows下dos命令行

    Dos命令--基本命令 1.求助命令 例如:del /? rd /? 2.基本常用命令 例如:dir :列出当前目录下的文件以及文件夹,后面可以接其他路径 md:创建目录(mkdir),一次创建多级目 ...

  7. 使用CMD实现批量重命名[转]

    关键字:cmd DOS 批处理 批量 重命名 作者:lifesinger地址:http://www.cnblogs.com/txw1958/archive/2012/12/24/cmd-batch-r ...

  8. 12 Linux Which Command, Whatis Command, Whereis Command Examples

    This Linux tutorial will explain the three "W" commands. The three "W"s are what ...

  9. rman checksyntax和解决RMAN-01009: syntax error: found "dot"

    在日常清归档时候执行脚本报错 RMAN-00552: syntax error in command line argumentsRMAN-01009: syntax error: found &qu ...

随机推荐

  1. algorithm@ dijkstra algorithm & prim algorithm

    #include<iostream> #include<cstdio> #include<cstring> #include<limits> #incl ...

  2. 注册表-恶意首页追踪之旅(IE不能改主页)

    恶意首页追踪之旅(先说下,360无法修复这个恶意首页) 话说,今天下了个扫站的工具,结果一不小心中了恶意广告! 中招后不停的乱下东西安装,360不停的在那弹出提示! 无语了,一个个卸载,把C:\win ...

  3. 问题-Delphi在多线程中使用其他窗体上的控件,报“尚未调用CoInitialize”解决方法

    1.uses ActiveX; 2. procedure HLCJ.Execute;begin    CoInitialize(nil);    //要使用的控件    CoUninitialize; ...

  4. eas bos 编辑界面 editUIt 属性值为空

    在编辑界面,我们可以正常的保存某个值到数据库,同时列表界面也可以正常显示. 但是当我们再次打开这个编辑界面的时候,该属性值缺无法显示. 通常情况下,通过下面两个方法可以解决 方法一: 在编辑界面重写一 ...

  5. java利用Google Zxing实现 二维码生成与解析

    1.引入zxing 2.使用下面两个类:QRCodeUtil.java和BufferedImageLuminanceSource.java 3.新建单元测试类 复制下面测试代码即可. 1.pom文件中 ...

  6. Java开发中常见的危险信号(中)

    本文来源于我在InfoQ中文站原创的文章,原文地址是:http://www.infoq.com/cn/news/2013/12/common-red-flags-in-java-1 Dustin Ma ...

  7. Script Form

    Script Form 是SAP所提供的一款强大的报表设设计工具. 一.Script Form主要工具包括如下: 1)Form Painter:格式绘制器,用于格式的设定.TCoce:SE71. 2) ...

  8. [ES6] 23. Rest Parameters & Spread Parameters

    Rest Parameters: In ES5, when you don't know how many paramters will be passed in, you can use argum ...

  9. windows 7 64位 安装oracle 11g R2

    1.下载Oracle 11g R2 for Windows的版本 下载地址: http://www.oracle.com/technetwork/database/enterprise-edition ...

  10. MySQL 数据库常用命令 超级实用版分享

    1.MySQL常用命令 create database name; 创建数据库 use databasename; 选择数据库 drop database name 直接删除数据库,不提醒 show ...