0

My problem is when I try a curl command it works but when I put it in a script like this :

set df=si  
set projet=su  
set pathD="uri" : "/  
set pathF=,  
set path=%pathD%+%projet%+%pathF%  
echo path  
if %df%==si (
  for /f "tokens=*"  %%a in (' curl -X GET -u admin:password "http://localhost:8081/artifactory/api/storage/si/" ')  do ( echo %%a )
) 

it returns curl is not a intern command
I don't know what happened but before I have no problem with it, when I try a curl command it works, it is strange.

αƞjiβ
  • 3,056
  • 14
  • 58
  • 95
Med braim
  • 463
  • 1
  • 7
  • 12
  • possible duplicate of [curl is not recognized as an internal or external command?](http://stackoverflow.com/questions/21207926/curl-is-not-recognized-as-an-internal-or-external-command) – αƞjiβ Jun 09 '15 at 16:03

1 Answers1

0

The environment variable %path% is used to enumerate the folders where executable files will be searched if not present in the current active directory. If you overwrite it with your data, program will not be found.

MC ND
  • 69,615
  • 8
  • 84
  • 126