<p>I need to copy files using Windows command-line (available on XP Pro or later by default) and show progress during the process.</p>

<p>The progress indicator could be in a terminal or a GUI window. It is intended to be used during batch file scripting.</p>

[{'answer_id': 58785, 'author': 'Kent Boogaart', 'author_id': 5380, 'author_profile': 'https://Stackoverflow.com/users/5380', 'pm_score': 4, 'selected': False, 'text': '<p><a href="http://en.wikipedia.org/wiki/Robocopy" rel="noreferrer">robocopy</a>:</p>\n\n<blockquote>\n  <p><strong>Robocopy</strong>, or "Robust File Copy", is a <a href="https://en.wikipedia.org/wiki/Command_line_interface" rel="noreferrer">command-line</a> directory and/or file replication <a href="https://en.wikipedia.org/wiki/Command_(computing)" rel="noreferrer">command</a>. Robocopy functionally replaces <a href="https://en.wikipedia.org/wiki/Xcopy" rel="noreferrer">Xcopy</a>, with more options. It has been available as part of the <a href="https://en.wikipedia.org/wiki/Windows_Resource_Kit" rel="noreferrer">Windows Resource Kit</a> starting with Windows NT 4.0, and was first introduced as a standard feature in <a href="https://en.wikipedia.org/wiki/Windows_Vista" rel="noreferrer">Windows Vista</a> and <a href="https://en.wikipedia.org/wiki/Windows_Server_2008" rel="noreferrer">Windows Server 2008</a>. The command is <code>robocopy</code>...</p>\n</blockquote>\n'}, {'answer_id': 58801, 'author': 'Gulzar Nazim', 'author_id': 4337, 'author_profile': 'https://Stackoverflow.com/users/4337', 'pm_score': 1, 'selected': False, 'text': '<p>This technet <a href="http://blogs.technet.com/askperf/archive/2007/05/08/slow-large-file-copy-issues.aspx" rel="nofollow noreferrer">link</a> has some good info for copying large files. I used an exchange server utility mentioned in the article which shows progress and uses non buffered copy functions internally for faster transfer.</p>\n\n<p>In another scenario, I used robocopy. <a href="http://technet.microsoft.com/en-us/magazine/cc160891.aspx" rel="nofollow noreferrer">Robocopy GUI</a> makes it easier to get your command line options right.</p>\n'}, {'answer_id': 4978220, 'author': 'adrian', 'author_id': 614216, 'author_profile': 'https://Stackoverflow.com/users/614216', 'pm_score': 6, 'selected': False, 'text': '<p>I used the copy command with the /z switch for copying over network drives. Also works for copying between local drives. Tested on XP Home edition.</p>\n'}, {'answer_id': 13695754, 'author': 'djangofan', 'author_id': 118228, 'author_profile': 'https://Stackoverflow.com/users/118228', 'pm_score': 0, 'selected': False, 'text': '<p>Here is the script I use:</p>\n\n<pre><code>@ECHO off\nSETLOCAL ENABLEDELAYEDEXPANSION\nmode con:cols=210 lines=50\nECHO Starting 1-way backup of MEDIA(M:) to BACKUP(G:)...\nrobocopy.exe M:\\ G:\\ *.* /E /PURGE /SEC /NP /NJH /NJS /XD "$RECYCLE.BIN" "System Volume Information" /TEE /R:5 /COPYALL /LOG:from_M_to_G.log\nECHO Finished with backup.\npause\n</code></pre>\n'}, {'answer_id': 18197248, 'author': 'Iconiu', 'author_id': 1377604, 'author_profile': 'https://Stackoverflow.com/users/1377604', 'pm_score': 3, 'selected': False, 'text': "<p>Some interesting timings regarding all these methods.  If you have Gigabit connections,  you should not use the /z flag or it will kill your connection speed.  Robocopy or dism are the only tools that go full speed and show a progress bar.  wdscase is for multicasting off a WDS server and might be faster if you are imaging 5+ computers.  To get the 1:17 timing, I was maxing out the Gigabit connection at 920Mbps so you won't get that on two connections at once.  Also take note that exporting the small wim index out of the larger wim file too longer than just copying the whole thing.</p>\n\n<pre><code>Model  Exe       OS       switches     index    size    time   link speed \n8760w  dism      Win8     /export-wim  index 1  6.27GB  2:21   link 1Gbps\n8760w  dism      Win8     /export-wim  index 2  7.92GB  1:29   link 1Gbps\n6305   wdsmcast  winpe32  /trans-file  res.RWM  7.92GB  6:54   link 1Gbps\n6305   dism      Winpe32  /export-wim  index 1  6.27GB  2:20   link 1Gbps\n6305   dism      Winpe32  /export-wim  index 2  7.92GB  1:34   link 1Gbps\n6305   copy      Winpe32  /z           Whole    7.92GB  25:48  link 1Gbps\n6305   copy      Winpe32  none         Wim      7.92GB  1:17   link 1Gbps\n6305   xcopy     Winpe32  /z /j        Wim      7.92GB  23:54  link 1Gbps\n6305   xcopy     Winpe32  /j           Wim      7.92GB  1:38   link 1Gbps\n6305   VBS.copy  Winpe32               Wim      7.92    1:21   link 1Gbps\n6305   robocopy  Winpe32               Wim      7.92    1:17   link 1Gbps\n</code></pre>\n\n<p>If you don't have robocopy.exe available, why not run it from the network share you are copying your files from?  In my case, I prefer to do that so I don't have to rebuild my WinPE boot.wim file every time I want to make a change and then update dozens of flash drives.</p>\n"}, {'answer_id': 25733912, 'author': 'npocmaka', 'author_id': 388389, 'author_profile': 'https://Stackoverflow.com/users/388389', 'pm_score': 4, 'selected': False, 'text': '<p>The <a href="http://technet.microsoft.com/en-us/library/hh875546.aspx" rel="nofollow noreferrer">Esentutl</a>  /y option allows copyng (single) files with progress bar like this :</p>\n<p><img src="https://i.stack.imgur.com/2r7Td.jpg" alt="enter image description here" /></p>\n<p>the command should look like :</p>\n<pre><code>esentutl /y &quot;FILE.EXT&quot; /d &quot;DEST.EXT&quot; /o\n</code></pre>\n<p>The command is available on every windows machine but the <code>y</code> option is presented in windows vista.\nAs it works only with single files does not look very useful for a small ones.\nOther limitation is that the command cannot overwrite files. <a href="https://github.com/npocmaka/batch.scripts/blob/master/fileUtils/progressCopy.bat" rel="nofollow noreferrer"><em><strong>Here\'s</strong></em></a> a wrapper script that checks the destination and if needed could delete it (help can be seen by passing <code>/h</code>).</p>\n'}, {'answer_id': 65947395, 'author': 'CommanderBoss Ge', 'author_id': 15071410, 'author_profile': 'https://Stackoverflow.com/users/15071410', 'pm_score': 0, 'selected': False, 'text': '<p>If you want to copy files and see a &quot;progress&quot; I suggest the script below in Batch that I used from another script as a base</p>\n<p>I used a progress bar and a percentage while the script copies the game files Nuclear throne:</p>\n<pre><code>@echo off\ntitle NTU Installer\nsetlocal EnableDelayedExpansion\n\n@echo Iniciando instalacao...\nif not exist &quot;C:\\NTU&quot; (\n    md &quot;C:\\NTU\n)\nif not exist &quot;C:\\NTU\\Profile&quot; (\n    md &quot;C:\\NTU\\Profile&quot;\n)\nping -n 5 localhost &gt;nul\n\nfor %%f in (*.*) do set/a vb+=1\nset &quot;barra=&quot;\n::loop da barra\nfor /l %%i in (1,1,70) do set &quot;barra=!barra!Û&quot;\nrem barra vaiza para ser preenchida\nset &quot;resto=&quot;\nrem loop da barra vazia\nfor /l %%i in (1,1,110) do set &quot;resto=!resto!&quot;\nset i=0\nrem carregameno de arquivos\nfor %%f in (*.*) do (\n    &gt;&gt;&quot;log_ntu.css&quot; (\n        copy &quot;%%f&quot; &quot;C:\\NTU&quot;&gt;nul\n        echo Copiado:%%f\n    )\n    cls\n    set /a i+=1,percent=i*100/vb,barlen=70*percent/100\n    for %%a in (!barlen!) do echo  !percent!%% /                         \n    [!barra:~0,%%a!%resto%]\n    echo Instalado:[%%f] / Complete:[!percent!%%/100%]\n    ping localhost -n 1.9  &gt;nul\n)\nxcopy /e &quot;Profile&quot; &quot;C:\\NTU\\Profile&quot;&gt;&quot;log_profile.css&quot;              \n\n@echo Criando atalho na area de trabalho...\ncopy &quot;NTU.lnk&quot; &quot;C:\\Users\\%username%\\Desktop&quot;&gt;nul\nping localhost -n 4  &gt;nul\n\n@echo Arquivos instalados!\npause\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/58782', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/-1/']