curl command don't work in some cases

300 views Asked by At

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.

1

There are 1 answers

0
MC ND On

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.