sh.exe阻止Windows cmd move命令运行 [英] sh.exe is preventing windows cmd move command from working
问题描述
我正在运行一个名为ACSLX
的旧应用程序.它正在尝试调用DOS移动命令,但是由于sh.exe
在我的路径中,因此出现错误. sh.exe
是Git
的一部分,也是RTools
的一部分,这两个我都已安装.如您所见,它只是在尝试移动文件,但这失败了.我该如何预防呢?当我尝试构建"Spring"示例项目时,这是ACSLX的控制台输出.
I am running an old application called ACSLX
. It is trying to call a DOS move command, but because sh.exe
is in my path, I am getting an error. sh.exe
is part of Git
and also RTools
, both of which I have installed. As you can see it is simply trying to move a file, but this is failing. How can I prevent this? This is the console output of ACSLX when I try to build the "Spring" example project.
##### Build starting...
C:\acslX\ShSysTime.exe
Current System Time 15:05:02
"C:\acslX\atrans.exe" -lic_path "C:\acslX\license.lic;C:\acslX\*.lic" -no_xsl -no_compile -no_link "C:\acslX\Examples\MODELD~1\SPRING~1\SPRING~2\spring.csl"
ACSL Translator
Copyright 2002-2015, AEgis Technologies Group, Inc.
All rights reserved.
--------------------------------------------------------
The license path is now: C:\acslX\license.lic;C:\acslX\*.lic
INFO: TRANSLATOR: Starting Translation...
INFO: ANALYZER: Sorting sections using DFS algorithm.
INFO: ANALYZER: Sorting performed in 0.001000 seconds.
INFO: Translator completed successfully
===================================
move "C:\acslX\Examples\MODELD~1\SPRING~1\SPRING~2\spring.xml" ".\spring.ail"
/Rtools/bin/sh: move: command not found
C:\acslX\mingw32\bin\make.exe: *** [spring.ail] Error 127
##### Build failed.
推荐答案
另一种方法是随时准备一点.bat来设置PATH:
Another option is to have a little .bat ready to set your PATH whenever you need it:
将其命名为senv.bat,并将其放入您当前的%PATH%
Call it senv.bat, and put it in your current %PATH%
其中:
set PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\
set PATH=C:\acslX;%PATH%
... other PATHs you might need
请不要在其中添加GitHub路径或R路径,以免发生任何冲突.
Simply don't add GitHub path or R path in it to avoid any conflict.
在需要执行ACSLX会话的任何CMD中,键入"senv":该会话将具有简化的PATH,仅包含您需要的内容.
无需重命名.
In any CMD where you need to do an ACSLX session, type 'senv': that session will have a simplified PATH with only what you need.
No need to rename anything.
在该会话之外,您通常的当前PATH保持不变.
Outside of that session, your usual current PATH remains unchanged.
OP添加:
,我不在命令行中工作,我正在ACSLX GUI中工作,我认为我无法修改它在后台运行的脚本.
, I am not working in the command line, I am working in the ACSLX GUI, I don't think I can modify the scripts it is running in the background.
我回答:用正确的PATH启动ACSLX GUI.
这就是 OP的答案所实现的.
To which I replied: the ACSLX GUI be launched with the proper PATH.
That is what the OP's answer implements.
这篇关于sh.exe阻止Windows cmd move命令运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!