Export (0) Print
Expand All
Expand Minimize

Bitsadmin /addfilewithranges

Published: April 17, 2012

Updated: April 17, 2012

Applies To: Windows 8, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Vista

Adds a file to the specified job. BITS downloads the specified ranges from the remote file.

bitsadmin /AddFileWithRanges <Job> <RemoteURL> <LocalName> <RangeList>

 

Parameter Description

Job

The job's display name or GUID

RemoteURL

RemoteURL is the URL of the file on the server.

LocalName

LocalName is the name of the file on the local computer. LocalName must contain an absolute path to the file.

RangeList

RangeList is a comma-delimited list of offset and length pairs. Use a colon to separate the offset value from the length value.

  • The token eof is a valid length value within the offset and length pairs in the <RangeList>. It instructs the service to read to the end of the specified file.

  • Note that AddFileWithRanges will fail with error code 0x8020002c when a zero-length range is specified along with another range with same offset, such as: C:\bits>bitsadmin /addfilewithranges j2 http://bitsdc/dload/1k.zip c:\1k.zip 100:0,100:5

    Error message: Unable to add file to job - 0x8020002c. The list of byte ranges contains some overlapping ranges, which are not supported.

    Workaround: do not specify the zero-length range first. For example: bitsadmin /addfilewithranges j2 http://bitsdc/dload/1k.zip c:\1k.zip 100:5,100:0.

The following example tells BITS to transfer 100 bytes from offset 0, 100 bytes from offset 2000, and the remaining bytes from offset 5000 to the end of the file.

C:\>bitsadmin /addfilewithranges http://downloadsrv/10mb.zip c:\10mb.zip "0:100,2000:100,5000:eof"

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft