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

learn more… | top users | synonyms

33
votes
6answers
18k 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 ...
29
votes
3answers
31k 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 ...
19
votes
2answers
18k 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 ...
9
votes
9answers
9k 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 ...
7
votes
3answers
3k views

delete recursive directory created by robocopy when “The file name is too long”

After running robocopy.exe to backup a C:\Users\ folder without using the /xj switch, I ended up with a recursive directory which was too long. For example, if you run dir /b /s you will receive the ...
6
votes
1answer
29k 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 ...
5
votes
2answers
1k views

How to wake a network drive from batch script?

I have a batch script which runs a robocopy. It is failing because the drive is not awake. In windows explorer, doubling clicking on that icon "wakes" up the link and the cross disappears and the ...
5
votes
2answers
5k views

How do I hide “Extra File” and “100%” lines from robocopy output?

I have a robocopy script to back up our Kiln repositories that runs nightly, which looks something like this: robocopy "$liveRepoLocation" "$cloneRepoLocation" /MIR /MT /W:3 /R:100 ...
4
votes
2answers
6k views

What is the benefit of copy over xcopy on the command line?

I know that xcopy has more options however is there some benefit to using copy rather than xcopy?
4
votes
4answers
2k views

Robocopy unilog output is gibberish

I tried to get robocopy in Windows 7 to generate a Unicode log, since I have files with Unicode characters. The command I used: robocopy C:\mysource D:\mydest /mir /unilog:backup.log /tee File the ...
4
votes
1answer
10k 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 ...
3
votes
7answers
3k views

Incremental/Differential Backup on Windows

What's the easiet way to perform an incremental/differential backup to a network share in Windows? Does a Robocopy/Xcopy solution work reasonably well (I need to the parameters!) or is there a good ...
3
votes
1answer
38 views

Does robocopy make a local copy of the files?

I have a seagate NAS which I access over a shared folder. I also have 3 computers with a shared folder. I want to backup files from the 3 computers to the seagate NAS. I cannot run those tasks with ...
3
votes
4answers
2k views

Using Robocopy for file rotation

I am looking for a way to use robocopy to rotate log files. Currently I have a batch file using robocopy to copy files and log the results to a specified folder location. What I would like to do is ...
3
votes
4answers
893 views

Robocopy and fragmentation

While copying large number of files, it's quite often to use multiple threads with RoboCopy (/MT[:n] option). Can this cause fragmentation on the destination drive? Sometimes I use Beyond compare for ...
3
votes
2answers
10k 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 ...
3
votes
1answer
5k views

Robocopy, how to log only errors?

Will the options /nfl /ndl be enough and not exclude errors too?
3
votes
1answer
263 views

Windows 7 Delete heavily nested folder structure

I was running a node script that went awry and created a folder structure like so: \myfolder \myfolder \file.txt \myfolder \file.txt \myfolder ...
3
votes
2answers
5k views

How to use Volume Shadows Copy and Robocopy on Win7?

I’d like to backup my system with Robocopy and Powershell, but Robocopy is not able to copy open files. Volume Shadows Copy seems a solution but I can’t find any clear and simple explanation on how to ...
3
votes
2answers
11k views

How to robocopy with progress logged to console only?

I want to run RoboCopy that will update the console with % progress but not clutter the log file with % progress. The following RoboCopy command will perform the desired copy and append logging ...
3
votes
1answer
1k views

Robocopy Mirror Backup gone awry

I have created a simple batch file script for running Robocopy. It is set to make a backup of my user account folder to my external hard drive. Here's the parameters for Robocopy: ROBOCOPY ...
2
votes
4answers
7k views

Does Robocopy Keep a Log File by Default?

I copied a huge number of files using Robocopy, and recived a note at the end that two files failed. I didn't set a switch to save a log file. Is there a log file saved in a default location ...
2
votes
4answers
7k 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 ...
2
votes
1answer
23 views

Trying to pseudo-sync 2 computers - why folders renamed?

Trying to pseudo-sync 2 computers - why folders renamed? Windows 7 - new computer Vista - old computer I create a new folder OldComputerDesktop in C:\Users\joeblow. I execute this: robocopy.EXE ...
2
votes
1answer
218 views

Robocopy on network as part of a pipeline

I have the following pipeline: [other vendor] sends files to my Windows filesystem, which are indexed starting with the next unused number (normally file.001) I move the files with RoboCopy to my ...
2
votes
2answers
343 views

Are junctions affected if the drive is formatted?

I was trying to relocate my user profiles, so that they are not affected by any problems occuring in the drive on which the operating system is stored. I've managed to move user profiles using ...
2
votes
4answers
5k views

Copy files from FAT32 to NTFS, preserving date

I have a FAT32 flash drive full of old archived emails, and their creation/modification date is important because it represents when the email was received. I'm trying to copy these over to another ...
2
votes
2answers
200 views

What is the fastest way to mirror a directory tree on a DVD to a local hard disk in Windows 7

Recently I had DVD with a folder that contained over 83,000 files and folders. When I went to mirror this folder onto a local harddrive with ROBOCOPY I quickly discovered that more than an hour had ...
2
votes
1answer
124 views

Robocopy copy only changed files to new folder

I'd like to create a backup such as the following: C:/backups/20140101/ All files from source folder C:/backups/20140102/ Only files changed since last backup C:/backups/20140103/ Only files ...
2
votes
1answer
4k 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 ...
2
votes
1answer
91 views

How can I clone a directory structure with symbolic links (in-tact, also duplicated)?

We use Kiln for our source control; and back it up by copying the KilnRepositories folder to another (local) drive while the services are all stopped, and then on to a network drive afterwards (the ...
2
votes
1answer
147 views

Can I prompt a user to save a file using windows explorer?

I'm trying to build a windows batch file that will copy a folder and all its contents from the local user directory into an individually named folder on a shared server. The name of the folder on the ...
2
votes
1answer
633 views

robocopy can’t find newly zipped file for copy

I am working with a batch file that is being used to copy files from several remote servers to one central repository using robocopy. I am trying to zip the contents of a folder and then copy it but ...
2
votes
3answers
851 views

Delete dupe files from source, move only missing across to target in Robocopy

We copied all our files to a new storage server recently. We didn't want to move at the time because we weren't sure if files would get lost. The problem now is that we have files on both places. ...
2
votes
2answers
4k views

How to abort robocopy on first error

When using robocopy windows utility, what flags do I set so that robocopy aborts on the very first error it sees, similar to xcopy /dry command? I need to mirror two dirs, and on occasion some files ...
2
votes
2answers
911 views

Why does Robocopy ignore the /copy flags?

Robocopy Copy Flags? I just recently made an answer here http://stackoverflow.com/a/15211788/891976 where I suggested using robocopy and its /copy flags, but for some as of yet unknown reason, the ...
2
votes
0answers
698 views

Batch file to move/compress/delete files

I am trying to write a batch script that will run automatically daily to do the following: Move files older than 2 days to from the main directory (Jason) to an archive directory. Zip files in the ...
2
votes
0answers
1k views

command line remove read only flag on all subfolder entries or overwrite read only files with robocopy

I need one of two things to work: I use robocopy to copy all sub-files and sub-folders from one folder to another, and the destination contains older files + files not in the source, and I need the ...
1
vote
5answers
654 views

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

Maybe could be hard to explain, but I'll! I'm on Windows 7 Professional, and this is my scenario : Folder "Asd" (C:\) Folder "Asd" (D:\) File 1 File 1 File 2 ...
1
vote
1answer
483 views

Robocopy /XD Won't Work With Relative Paths

I am trying to run a robocopy /MOVE command but exclude a couple of sub-directories specified with the /XD flag. robocopy ".\CurrentDir" ".\NewDir" /XD ".\CurrentDir\SubDir1" ".\CurrentDir\SubDir2" ...
1
vote
3answers
4k 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 ...
1
vote
1answer
99 views

Need to create a robocopy in Powershell 1.0

My ultimate goal is to mirror a folder and its subdirectories with the restriction of only copying files with the extensions, sln, vcxproj, cs, cpp, hpp, c, and h. There are far too many subfolders ...
1
vote
2answers
290 views

Batch file, skip a step if an error occurs

I'm trying to write a script that automates copying some files from two external locations using Robocopy. I want the script to skip a step if one of the locations is unavailable. I'm using the ...
1
vote
3answers
168 views

Sync Only New Files

I have a large collection of photos. I only want to sync the latest (in my case right now 1 year) to a laptop. I have tried syncovery and Goodsync without seeing any modifiers that would only select ...
1
vote
1answer
7k views

How to use Robocopy to copy a folder structure into all (sub)folders located under one directory?

Is there anyway for me to quickly take an empty folder structure I have created on my desktop and copy it to 488 other folders all located on a network drive but in the same folder? My primary ...
1
vote
1answer
434 views

Scheduled Tasks - Display the script [duplicate]

Possible Duplicate: Why is Windows 7 scheduled task running hidden? I have a couple of Robocopy scripts setup in a scheduled task, but is there a way to actually display the cmd prompt with ...
1
vote
1answer
322 views

Robocopy prepends drive letter on filepaths even when drive is specified

robocopy /"C:\Users\john smith\Documents\Visual Studio 2010\Projects\project\checker\bin\Debug\/" /"C:\Users\john smith\project\Assemblies/" checker.dll When I run this through the command line it ...
1
vote
1answer
4k 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. ...
1
vote
3answers
4k views

Freebsd (Freenas 8) and robocopy gives Error 5 Time-Stamping Destination File WHy?

I have a NAS running FreeBSD/FreeNas 8.0.4 When I copy files from a windows system to it via SMB/CIFS normally (explorer/copy) it all goes fine. User can create/delete/update files When i attempt ...
1
vote
2answers
1k views

Robocopy to a drive connected to a wlan router fails

I have a wireless router and an USB hard drive connected to it. Basic file access on the command line and Explorer works flawlessly after having set up some options on the router and mapping to some ...