use bitsadmin with shortened url

0

The webpage Im trying to download is located at:

bit.ly/nlhtml

I want to download the above webpage using an in-built function in cmd; i.e, no wget or curl etc...

The code I tried is:

bitsadmin /transfer debjob /download /priority normal "bit.ly/nlhtml" "C:\bit\nl.html"

The above webpage should be saved in html format in folder "bit" in C drive.

The output Im getting for the above command is:

BITSADMIN version 3.0
BITS administration utility.
(C) Copyright Microsoft Corp.

Unable to add file - 0x8007010b
windows
powershell
internet-explorer
url
cmd
asked on Stack Overflow Nov 1, 2018 by Arsalan

1 Answer

0

The following is the command flow to get that done.

bitsadmin /create testjob

bitsadmin /addfile testjob "url" "path\to\file.html"

bitsadmin /resume testjob

bitsadmin /info testjob /verbose

... Once state is TRANSFERRED THEN...

bitsadmin /complete testjob

https://docs.microsoft.com/en-us/windows/desktop/bits/bitsadmin-examples

answered on Stack Overflow Nov 1, 2018 by DarkMatter

User contributions licensed under CC BY-SA 3.0