Questions tagged [robocopy]

ROBOCOPY.exe - "Robust File Copy" is a Windows command line file & directory replication utility published by Microsoft.

ROBOCOPY.exe

Robust File Copy is a Windows command line file & directory replication utility published by Microsoft.

It is included with Windows Vista & later versions & is available for download for older versions of Windows as part of the Windows Server 2003 Resource Kit Tools.

References:

900 questions
18
votes
4 answers

After Robocopy, the copied Directory and Files are not visible on the destination Drive

I've been happily using robocopy for backing up my computers to an external usb drive. It's great since it only copies the files that were changed/updated/new. I can take my external drive to any machine and look at it just as if it's another drive…
Bill Campbell
  • 2,243
  • 6
  • 24
  • 32
18
votes
2 answers

How to robocopy subfolders with content

It is hard to believe but I seem to be not able to copy a folder with all its files (that begin with a certain character) and subfolders (beginning with the same character) to another folder in Windows 7. I used copy, xcopy and robocopy but all I do…
Largo
  • 427
  • 1
  • 5
  • 17
18
votes
7 answers

avoid existing file details of destination folder in Robocopy log

I would like to avoid all existing file names and details of destination folder while using Robocopy Log. Just want to show only copied file list and its details. So i could save on the robocopy log file size by avoiding existing file details on…
Sun_Sparxz
  • 941
  • 2
  • 12
  • 24
14
votes
4 answers

.Net library to move / copy a file while preserving timestamps

Does anyone know of a .Net library where a file can be copied / pasted or moved without changing any of the timestamps. The functionality I am looking for is contained in a program called robocopy.exe, but I would like this functionality without…
bulltorious
  • 7,649
  • 3
  • 46
  • 73
14
votes
3 answers

Robocopy copy contents of current folder

How would you translate this xcopy command into Robocopy: xcopy *.* "C:\DestinationFolder\" Keeping in mind that the current folder where the command is run changes dynamically (and hence the source folder is unknown in advance). Thanks.
joerage
  • 4,653
  • 4
  • 35
  • 48
13
votes
4 answers

Robocopy - exclude a lot of directories

I have problem with robocopy. I want to use it for backing up a system disc and I want to exclude some system folders. But it's still trying to copy some of these folders. My batch file is this: robocopy c:\ l:\C\ /r:1 /w:1 /mir /dcopy:T /xjd /xjf…
Shortik
  • 155
  • 1
  • 1
  • 8
12
votes
5 answers

File copy using robo copy and process

I am creating a File copy program which will copy large number of files(~100,000) with size ~50 KB using ROBOCOPY command. For each file, I am creating a new process and passing the ROBOCOPY command and arguments as follow: using (Process p = new…
Biju Thomas
  • 929
  • 3
  • 11
  • 23
12
votes
9 answers

Batch - Converting variable to uppercase

How would I go about changing the destl variable to uppercase before it is used. I assume some sort of character swap, however I couldn't get it working. Code is as follows - @echo off echo. set /P "destf=Enter First Name: " set /P "destl=Enter…
Joshua Patterson
  • 313
  • 1
  • 2
  • 14
12
votes
3 answers

run robocopy bat to copy entire drive to another drive

I'm trying to run a simple backup (mirror) of one entire drive (d:) to another drive (k:). I've created a .bat file ('backup.bat') defining the source (d:) and destination (k:) and placed this batch file within a folder on the d drive (d:\temp).…
cherrytree
  • 1,373
  • 3
  • 14
  • 28
11
votes
2 answers

Robocopy - /XA:SH - to exclude system, hidden directories?

It seems to only work on files. Or am I doing something wrong? I tried backing a user folder (C:\Users\XXX) in Vista, which has a bunch of hidden/system folders. I used /XA:SHT The folder 'AppData' is 'hidden' but NOT 'system', so it was not…
mcu
  • 2,622
  • 7
  • 32
  • 58
11
votes
1 answer

Why does robocopy retries 1000000 times?

I get a couple of legacy bat scripts used for files synchronization. They use robocopy. According to the documentation, by default, there's a retry mechanism : one million retries, 30 seconds between retries. So, if I understand well, if something…
irimias
  • 261
  • 1
  • 2
  • 5
11
votes
4 answers

Powershell with Robocopy and Arguments Passing

I'm trying to write a script that uses robocopy. If I were just doing this manually, my command would be: robocopy c:\hold\test1 c:\hold\test2 test.txt /NJH /NJS BUT, when I do this from powershell, like: $source = "C:\hold\first…
weloytty
  • 4,940
  • 5
  • 26
  • 35
10
votes
5 answers

ROBOCOPY - Copy folders content to a single folder

Here is some code I made :) @echo off set source="R:\Contracts\" set destination="R:\Contracts\Sites\" ROBOCOPY %source% %destination% *.srt *.pdf *.mp4 *.jpg /COPYALL /R:0 /S for /r %source in (*) do @copy "%destination" . R:\Contracts\ is full of…
Arthor
  • 594
  • 2
  • 10
  • 34
10
votes
2 answers

How to delete "The file name is too long." in windows. [Command Prompt]

How to delete large file path/file name files in Windows. Which is slimier to Linux rm -rf . ?
Ashish Dadhich
  • 3,529
  • 3
  • 11
  • 24
9
votes
3 answers

Are there any API wrapper of Robocopy?

Robocopy is the best reliable and feature rich way to batch copy files on Windows. However, it is a command line tool. I am looking for a library/API that I could do the same in my program. I tried to use Process.Start(), but then I have to capture…
Dennis C
  • 23,310
  • 12
  • 68
  • 98
1
2
3
60 61