Accessing artifacts from another project

markfinal's Avatar


16 May, 2019 10:14 AM


I've been trying to download an artifact from a different project in appveyor. I've used the following as reference

but I am still not managing to do it.

The project containing the artifacts is, in the master branch, on the Visual Studio 2017 job; there are two artifacts, called and It is the former I want. For example, the last successful build artifacts can be seen at

I'm trying to download that zip from this other project:
All the builds are currently failing there with my various attempts. The most recent is a 404 error, which corresponds to this line in the .appveyor file:

  - appveyor DownloadFile ""


If I put that URL into a web browser, I get this JSON reply:

{"message":"Build job with specified name not found or access denied."}

I'm sure it's something trivial I've missed off, but I've been been able to find the necessary bit of info online.

Can someone help please?


  1. 1 Posted by Owen McDonnell on 16 May, 2019 03:28 PM

    Owen McDonnell's Avatar

    Full name, url encoded, of artifact url is required. Try this...

  2. 2 Posted by markfinal on 17 May, 2019 01:11 PM

    markfinal's Avatar


    Your suggestion works when using the URL in a browser.

    But I'm still getting the 404 error when using it in the appveyor script :( See

  3. 3 Posted by markfinal on 17 May, 2019 02:44 PM

    markfinal's Avatar

    I also tried wrapping the entire DownloadFile command line in single quotes, as per, but that still reports the 404 error

  4. 4 Posted by Owen McDonnell on 17 May, 2019 05:46 PM

    Owen McDonnell's Avatar

    You just need to escape the ampersand(&) in the url with (^) like this,

    appveyor downloadfile '^&job=Image%3A%20Visual%20Studio%202017'
  5. 5 Posted by markfinal on 17 May, 2019 07:46 PM

    markfinal's Avatar


    I copied that line directly into my .appveyor.yml.
    I no longer get the 404 error (yay).
    But I cannot find where the artifact downloaded to. I have tried a dir command on the current directory.
    I've also tried adding a -Filename option to the download file command to specify where it goes, to no avail (so is now removed).

    Does the file get downloaded somewhere else by default?

    Latest result can be seen here:

  6. 6 Posted by markfinal on 19 May, 2019 06:20 AM

    markfinal's Avatar

    I've been investigating why the URL works in a browser (e.g. Chrome) but not in appveyor scripts.

    Using the developer tools, I figured out that this url


    is a redirect (302). Would I be right in thinking 'appveyor DownloadFile' doesn't follow redirects?

    So I switched to using curl. I used the default settings (but removed the silent options) from and enabled redirects (-L). And this command line works from my local computer:

    curl -fL -o ""

    But it still fails with a 404 in appveyor.

    If I remove the -f option from curl, I then get JSON downloaded in appveyor containing:

    {"message":"Build job with specified name not found or access denied."}

    (see for example).

    Again, the real file is downloaded on my local console with that curl command line, since redirects are still enabled.

    Any thoughts on how to proceed?

  7. 7 Posted by Owen McDonnell on 20 May, 2019 04:17 AM

    Owen McDonnell's Avatar

    Curl does not follow redirects by default but you can use -L flag to make it do so.
    I believe you're right about the appveyor downloadfile utility not following redirects.

    What worked for me was sticking with powershell like so,

    - ps: Start-FileDownload ''
  8. 8 Posted by markfinal on 20 May, 2019 07:38 AM

    markfinal's Avatar

    That worked!! Great.

    I had tried almost that a few days ago which had not worked, but had double quotes around the URL instead. Single quotes were the key.


  9. markfinal closed this discussion on 20 May, 2019 07:38 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac