Is it possible to if check a url/file/link and then let curl download it if it exists?
if check "https://example.com/blabla/blabla.zip" (
curl ...
)
To check if a file in link exist using curl
use -I
flag:
curl.exe -I https://mirror.turbozoneinternet.net.br/videolan/vlc/3.0.8/win64/vlc-3.0.8-win64.exe | find "Content-Length:" >nul && (
echo / && echo/ Your link/file is Ok, downloading... && echo/
curl.exe -# https://mirror.turbozoneinternet.net.br/videolan/vlc/3.0.8/win64/vlc-3.0.8-win64.exe -o %temp%\vlc-3.0.8-win64.exe
) || (echo/ Error^!)
This is adapted code from answer /by @pberlijn