We help IT Professionals succeed at work.
Get Started

i am getting an error from a bat file saying directory or filename not right but i can not see why as the directory or file points correctly

944 Views
Last Modified: 2015-10-29
Hi,


I am running below .bat file via team city but it is throwing an error as below could you see why would i get that and how i can fix this? thanks

SCRIPT;

"C:\Source\SS.SpreadsMarketManagement\SPIN.MarketManagement.IntegrationTests\SPIN.MarketManagement.IntegrationTests\NUnit-2.6.4\bin\nunit-console.exe" /labels /out=TestResult.txt /xml=TestResult.xml /framework=net-4.0 bin\Debug\SPIN.MarketManagement.IntegrationTests.dll
 
"C:\Source\SS.SpreadsMarketManagement\SPIN.MarketManagement.IntegrationTests\packages\SpecFlow.1.9.0\tools\specflow.exe" nunitexecutionreport SPIN.MarketManagement.IntegrationTests.csproj
 
IF NOT EXIST TestResult.xml GOTO FAIL
IF NOT EXIST TestResult.html GOTO FAIL
EXIT
 
:FAIL
echo ##teamcity[buildStatus status='FAILURE']
EXIT /B 1

Open in new window


ERROR as below log shows;

Step 3/6: Run Specflow (Command Line)
[17:19:59][Step 3/6] Starting: C:\BuildAgent\work\d36e2f25629d2214\SPIN.MarketManagement.IntegrationTests\SPIN.MarketManagement.IntegrationTests\RunSpecFlow.bat
[17:19:59][Step 3/6] in directory: C:\BuildAgent\work\d36e2f25629d2214\SPIN.MarketManagement.IntegrationTests
[17:19:59][Step 3/6] 
[17:19:59][Step 3/6] C:\BuildAgent\work\d36e2f25629d2214\SPIN.MarketManagement.IntegrationTests>"C:\Source\SS.SpreadsMarketManagement\SPIN.MarketManagement.IntegrationTests\SPIN.MarketManagement.IntegrationTests\NUnit-2.6.4\bin\nunit-console.exe" /labels /out=TestResult.txt /xml=TestResult.xml /framework=net-4.0 bin\Debug\SPIN.MarketManagement.IntegrationTests.dll 
[17:19:59][Step 3/6] 
[17:19:59][Step 3/6] C:\BuildAgent\work\d36e2f25629d2214\SPIN.MarketManagement.IntegrationTests>"C:\Source\SS.SpreadsMarketManagement\SPIN.MarketManagement.IntegrationTests\packages\SpecFlow.1.9.0\tools\specflow.exe" nunitexecutionreport SPIN.MarketManagement.IntegrationTests.csproj 
[17:19:59][Step 3/6] The filename, directory name, or volume label syntax is incorrect.
[17:19:59][Step 3/6] The system cannot find the path specified.
[17:19:59][Step 3/6] 
[17:19:59][Step 3/6] C:\BuildAgent\work\d36e2f25629d2214\SPIN.MarketManagement.IntegrationTests>IF NOT EXIST TestResult.xml GOTO FAIL 
[17:19:59][Step 3/6] 
[17:19:59][Step 3/6] C:\BuildAgent\work\d36e2f25629d2214\SPIN.MarketManagement.IntegrationTests>echo 
[17:19:59][Step 3/6] ##teamcity[buildStatus status='FAILURE']
[17:19:59][Step 3/6]  
[17:19:59][Step 3/6] ##teamcity[buildStatus status='FAILURE']
[17:19:59][Step 3/6] 
[17:19:59][Step 3/6] C:\BuildAgent\work\d36e2f25629d2214\SPIN.MarketManagement.IntegrationTests>EXIT /B 1 
[17:19:59][Step 3/6] Process exited with code 1
[17:19:59][Step 3/6] Step Run Specflow (Command Line) failed

Open in new window

Comment
Watch Question
CERTIFIED EXPERT
Commented:
This problem has been solved!
Unlock 1 Answer and 26 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE