Skip to main content

Questions tagged [robocopy]

Robocopy (or "Robust File Copy") is a command-line directory replication command.

Filter by
Sorted by
Tagged with
134 votes
2 answers
176k views

What does Robocopy mean by tweaked, lonely, and extra?

The Robocopy documentation for the option /it is simply “Includes ‘tweaked’ files”. What does “tweaked” mean? The Robocopy documentation for the option /xl is simply “Excludes ‘lonely’ files and ...
sean e's user avatar
  • 2,781
8 votes
3 answers
29k views

Use OneDrive as additional backup location

I'm trying to take advantage of the fact that OneDrive now offers unlimited space, and allows these files to not take up space locally. I already have a backup system in place, but I would like to add ...
Jason Young's user avatar
5 votes
2 answers
4k views

Robocopy command to copy updated files and long path names

I'm trying to write a robocopy command to copy from folders SR to DS. Folder DS might have files that already exist in Folder SR, but if Folder DS is updated, don't overwrite it. If folder/files ...
SandoraKiam's user avatar
8 votes
5 answers
67k views

Access denied, cmd move windows 7

I can't use this command in win 7 when want to move a directory if the destination exists. It says Access denied. Why hapens this? It worked in XP. move /y "%1" c:\mydir\ I can use robocopy, but ...
Aziz's user avatar
  • 597
35 votes
3 answers
142k views

Does Robocopy SKIP copying existing files by default?

I've read (somewhere) that Robocopy skips copying over existing files by default. But... I can't find any Command Line switches for that.
Clay Nichols's user avatar
  • 5,376
7 votes
5 answers
7k views

How can I copy files from A to B, only including files that exist in B?

I'm on Windows 7 Professional, and this is my scenario : Folder "Asd" (C:\) Folder "Asd" (D:\) File 1 File 1 File 2 File 3 File 3 ...
markzzz's user avatar
  • 747
41 votes
2 answers
176k views

How to copy ONLY those files that are not in the destination?

Is it possible to use robocopy to copy only the files that do not exist in destination? robocopy has a /is (include same files) switch. What I am looking for is an /xs switch. If a file exists in ...
yky's user avatar
  • 411
29 votes
3 answers
175k views

How to copy only new files AND only those that are modified after a certain date?

I would like to copy files from one drive to another, but I only want to copy source files that are newer than the destination file. BUT, I also want to only copy source files that have been changed ...
PaulStock's user avatar
  • 453
12 votes
5 answers
111k views

Robocopy permission denied

Robocopy is preinstalled with Windows 7. I've used it many times in the past. I tried to copy a folder to a remote share with robocopy c:\source "\\server\share\path" /s /r:2 /w:2` As a result I ...
Edosoft's user avatar
  • 800
46 votes
3 answers
96k views

Linux equivalent to robocopy?

It’s kind of funny, there are a lot of ways in which Linux command line tools are vastly superior to Windows ones, but one thing I have not found an equivalent to is robocopy. Robocopy is way more ...
Ibrahim's user avatar
  • 803
45 votes
6 answers
46k views

Will robocopy resume after being aborted?

My users directory is 58 GB in size and I am copying it to a portable USB backup drive from Windows recovery using Robocopy. robocopy G:\Users\ E:\Backup\T420\ /MIR /SEC /MT:32 /V /LOG:G:\bak\...
opticyclic's user avatar
  • 1,559
29 votes
2 answers
35k views

How does Robocopy determine if a file is "changed"?

I'm looking here for detailed info about how the algorithm of Robocopy determines whether a file has changed or not. If I use for example the /mir parameter, Robocopy must determine which files are ...
user54512's user avatar
  • 835
27 votes
4 answers
159k views

Robocopy - Copy directory into another directory

I can't believe that I am having trouble in copying a directory into another directory via the windows command line. What I want to do is simple -: Lets say I have a directory -: C:\test and I ...
ng.newbie's user avatar
  • 509
15 votes
4 answers
214k views

Robocopy to copy only new folders and files

Objective: To find all new files and subfolders under some root folder (let us say Documents) and to copy them to another disk (J: in this case). Command line used: robocopy c:\users\valery\...
Valery Shampal's user avatar
3 votes
5 answers
43k views

How to optionally copy and rename a file in Windows?

Basically, in an automated batch file, I want to copy and rename a file if the destination file is missing or older. There are several variants, which do not quite work: copy /Y c:\source\a.file c:\...
Paavo's user avatar
  • 31
3 votes
1 answer
14k views

why does robocopy say this file is older?

why does robocopy say this file is older? Robocopy shows (I think I used /MIR and /L) 2 M:\bk\laptopcopy\pics\ Older 79248 regular-expressions-cheat-sheet-v2.png None ...
barlop's user avatar
  • 24.2k
1 vote
2 answers
927 views

Copying files from somewhere within a directory tree to a folder

I have a mirror of a large website that I need to reorganize, most of the images and files I've been able to programmatically move and relink up; however, there are a few (few is a relative term, we'...
user avatar
0 votes
0 answers
7k views

Robocopy: ERROR 5 (0x00000005) Accessing Source Directory \\server\ParentFolder\ChildFolder\ Access is denied

I have the following robocopy command to copy the directory from a folder on the network location to another folder on the same network location: @ECHO OFF for /f %%a in ('wmic os get LocalDateTime ^|...
Yash Saraiya's user avatar
150 votes
12 answers
131k views

Getting ROBOCOPY to return a "proper" exit code?

Is it possible to ask ROBOCOPY to exit with an exit code that indicates success or failure? I am using ROBOCOPY as part of my TeamCity build configurations, and having to add a step to just silence ...
Lasse V. Karlsen's user avatar
90 votes
6 answers
381k views

Using robocopy and excluding multiple directories

I'm trying to copy some directories from a server before I restore from backup (my latest backup was corrupt, so I have to use an older one :( ). I'm in the Windows Recovery Environment and have ...
GorrillaMcD's user avatar
  • 2,403
46 votes
15 answers
161k views

Why can't a Task Scheduler job access a mapped network drive?

I have a Task Scheduler job to run Robocopy for backing up local files to a network share. I have to use domain credentials to access the network share but the local computer is not on the domain, and ...
Craig W's user avatar
  • 761
45 votes
2 answers
211k views

ROBOCOPY command to do an incremental backup

I am overwhelmed by the ROBOCOPY documentation. I want to do an incremental backup of my local files to the network drive (M). I want it to run as quickly as possible, with no log file and with as ...
dmm's user avatar
  • 591
34 votes
4 answers
71k views

What is backup mode in Robocopy

I am trying to copy a large database backup file over network. The traditional program copy or xcopy failed with different binary resulted. Also tried robocopy without parameter, and resulted a ...
ydoow's user avatar
  • 483
29 votes
3 answers
47k views

Are there any Pros/Cons to the /j Robocopy option (unbuffered copying)

Robocopy has a /J command line option recommended for copying large files (it copies using unbuffered I/O). What (if any) downsides are there? Any reason this isn't enabled by default? (That's what ...
Clay Nichols's user avatar
  • 5,376
19 votes
7 answers
39k views

How to copy a directory on Windows, preserving timestamps of all directories being copied

I want to copy a directory tree while preserving timestamps of any file and directory contained therein being copied. The source directory is on a data DVD (ISO-9660 filesystem). I am copying to an ...
Armen Michaeli's user avatar
13 votes
4 answers
37k views

Can Robocopy monitor files on a time increment of less than one minute?

Robocopy has the option to monitor the source directory, and copy over any files that have changes. You can specify how many changes in the directory must occur before copying (/mon n where n is the ...
nhinkle's user avatar
  • 37.5k
13 votes
11 answers
35k views

Robocopy does not copy the root folder and its time stamp

Robocopy does not copy the root folder and its time stamp - it copies all subdirectories and files (when the appropriate options are set) and there seems to be no option/argument to tell Robocopy you ...
ptrcao's user avatar
  • 173
10 votes
1 answer
46k views

Robocopy, how to log only errors?

Will the options /nfl /ndl be enough and not exclude errors too?
mt22's user avatar
  • 245
10 votes
4 answers
160k views

How do I create a log of robocopy actions and save in a text file named with today's date?

I am copying some assets from one folder to another using robocopy in command prompt. However, I want to log name of all those copied assets in a .txt file. This .txt file should be saved in the form ...
Yash Saraiya's user avatar
9 votes
2 answers
2k views

Using robocopy on windows led to infinite subfolder duplication via a stray shortcut file.... How can I avoid this?

I ran robocopy on my system (with all apps I could close, closed) and tried to rip the entirety of my C drive to a different drive. Im not sure why but, there was a systemlink in the C drive called &...
Mister SirCode's user avatar
9 votes
2 answers
56k views

Enable Robocopy logs

I have a robocopy job that is controlled by Windows Task Scheduler to run every 15 minutes to move files from one server to another. According to Windows Task Scheduler, the job is running fine. ...
mikebmassey's user avatar
9 votes
4 answers
6k views

Copy Files from One Drive to Another and Keep Hard-Link in Windows

I have drive A: with 16G Space and plenty of files, due to the Hard-link feature in NTFS, the files together is 15G but only takes 2G of real space. I like to copy all those files to drive B: which ...
Eric Yin's user avatar
  • 369
8 votes
4 answers
70k views

Robocopy: show skipped files and files with an error while copying

I'm using the following command for copying files while preserving timestamps: robocopy [source] [destination] /E /ZB /COPY:DAT /DCOPY:T /R:1 /W:5 /V /NFL /NDL /NS /NC /NP /log:"[log-path]" /XD "...
testing's user avatar
  • 869
7 votes
4 answers
26k views

Mirror/Backup from SSH/SFTP to Windows

What I am trying to do is mirror a directory (recursively) from a server I can SSH/SFTP to, to a Windows machine. I want to do this as part of a script, so it can be automated. I only want to copy ...
Andrew Russell's user avatar
6 votes
2 answers
13k views

Can Robocopy ensure file integrity?

I am trying to copy a large file, around 10G size, over Internet using Robocopy, but I am a bit concerned about the file integrity. So can I just trust Robocopy to ensure file integrity or I need to ...
iceagle's user avatar
  • 161
6 votes
1 answer
20k views

How does Robocopy handle file system links (symbolic links, hard links and junctions)?

Is it safe to delete a Robocopy backup? I have read that some people accidentally deleted files outside of the backup because it contained links/junctions. Can I prevent this?
Marco Eckstein's user avatar
4 votes
1 answer
3k views

Why are 16 threads more efficient than 8 on an i7 with hyperthreaded 4 cores? (Robocopy)

In Windows 8.1, I am using Robocopy to save 2 servers' data onto a dedicated PC's storage space. The data volume is 147,314 files in 4,110 folders (66,841,845,760 bytes). All 3 involved PCs feature ...
Herb's user avatar
  • 713
4 votes
3 answers
9k views

robocopy /mir changes destination folder name-how to prevent that

When I run a robocopy batch file that reads: robocopy "C:\Users\mgo\Documents" "E:\Documents backup on the UltraBay drive" /mir the destination folder gets renamed to "E:\My documents" WHY? How to ...
mgo's user avatar
  • 66
4 votes
3 answers
4k views

Why robocopy still copy an open file, opened by txt editor in windows

From wikipedia, it is told that robocopy will skip copying files in open status. However, when it is under test for robocopy behaviour, the robocopy still copy the opened file by the most simple text ...
Ken's user avatar
  • 43
4 votes
1 answer
6k views

Copying encrypted files to a non-encrypted folder using robocopy

If I use robocopy to copy encrypted files to a shared folder that does not support encryption, it fails with a The specified file could not be encrypted. This happens with or without the /EFSRAW ...
user209974's user avatar
3 votes
1 answer
2k views

Is there a Linux equivalent of “Robocopy /CREATE”?

I'm looking for a Linux equivalent of the command Robocopy /CREATE, which recreates a complete empty file tree with all the attributes of folders and files in the source, except the files' contents. ...
GabrielB's user avatar
  • 855
2 votes
1 answer
17k views

How rename files copied via Robocopy if it exist but with different modify date

I'm using Robocopy to copy files from a folder to another, i think my code will overwrite the file if it was existing on the destination folder and the timestamp was different, what im trying to do is ...
Islam Mohamed's user avatar
2 votes
1 answer
733 views

Robocopied files show in CMD but not in Explorer

I'm helping a friend to setup a back drive on his W7 machine. I installed a new hard drive internally to serve as a backup. I then wrote a simple script.bat that lives in his home folder, to be ...
wbg's user avatar
  • 305
2 votes
1 answer
2k views

ROBOCOPY, What is the meaning of "mismatch" and "failed"

Anyone could please clarify what's the meaning of the columns MISMATCH and FAILED in the Run summary?
Antonio MS's user avatar
2 votes
1 answer
6k views

Deleting all files from source directory after robocopy, but retaining those that cause errors

I plan to use robocopy to move files and folders from a directory on a server to a directory on a hard drive, using the following command, robocopy [source] [destination] /e /move /xo In the event of ...
someone's user avatar
  • 61
1 vote
3 answers
11k views

Robocopy exclude directories with wildcard

I am trying to backup critical folders and their contents on a daily basis so that, should my data drive fail, I have a backup of the important project files but my working data drive is much larger ...
Michael Stimson's user avatar
1 vote
1 answer
517 views

Any way to make Robocopy produce "failed" and "mismatched" files for testing purposes?

I'm learning Robocopy and I'd like to find a way to produce a Run summary with Failed and Mismatched files or folders. I guess you cannot produce a Failed result unless you have a hard drive with bad ...
Antonio23249's user avatar
  • 1,031
1 vote
1 answer
43k views

Access denied error with robocopy as admin [duplicate]

Possible Duplicate: Robocopy permission denied When trying to run the following command robocopy d:\directory \\server\directory /S /XO /COPY:DT I get an access denied error. I am running ...
Steve Wright's user avatar
1 vote
2 answers
5k views

CMD MOVE can't replace directories in WIN 7 [duplicate]

The MOVE command does not work when to ovewrite a directory. I have also tryed to run cmd with admin rights. I'm posting this question with more info so you can easily test it self. Make your own ...
Aziz's user avatar
  • 597
0 votes
0 answers
1k views

Powershell New-PSDrive from remote computer

I'm here again with one more question. As stated here, I sucessfully connected two servers to copy a lot of files. But the copy won't worked at all. It returns a lot of errors on files and folders ...
BHi's user avatar
  • 1