Skip to content

Instantly share code, notes, and snippets.

@WiVi71
WiVi71 / BITS_DN.CMD
Last active December 28, 2023 01:13
Simple batch file script to download file with progress bar using BITSAdmin
@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION
FOR /F %%A IN ('COPY /Z "%~DPF0" NUL') DO SET "CR=%%A"
FOR /F %%B IN ('ECHO PROMPT $H ^| CMD') DO SET "BS=%%B"
(SET \N=^
%=_Empty_Line_=%
)
:BITS_DN
IF NOT [%2] == [] IF [%3] == [] GOTO BITS_SET