So I have a batch file that works well on my computer either using %userprofile%
or writing out the full path. The issue I have is when I move this batch file to a new computer it gives me either a curl error or no error at all.
This line:
del "%userprofile%\Ayla_Data\AylaDatapoints\*.*?"
works fine on the other computer. This line:
curl -H "Authorization: auth_token %$token%" https://ads-dev.example.com/apiv1/number/!$Unit!/props.xml>%userprofile%\Ayla_Data\XMLFile.xml
Does not. All I did was put the folder Ayla_Data
onto a usb and copied it to a different computer.
If I take out the second part of the command curl works fine:
curl -H "Authorization: auth_token %$token%" https://ads-dev.example.com/apiv1/number/!$Unit!/props.xml
I thought that maybe I didn't have the userprofile
variable set but that hasn't helped. Is this a problem with the computer reading the %
as a character instead of part of a variable? I'm not really sure what's going on. Any ideas?