Questions tagged [robocopy]

Robocopy is a command line file copy utility for Windows-based operating systems.

Filter by
Sorted by
Tagged with
140 votes
4 answers
436k views

robocopy transfer file and not folder

I'm trying to use robocopy to transfer a single file from one location to another but robocopy seems to think I'm always specifying a folder. Here is an example: robocopy "c:\transfer_this.txt" "z:\...
user avatar
36 votes
8 answers
227k views

How to get robocopy running in powershell?

I'm trying to use robocopy inside powershell to mirror some directories on my home machines. Here's my script: param ($configFile) $config = Import-Csv $configFile $what = "/COPYALL /B /SEC/ /MIR" $...
Mark Allison's user avatar
  • 2,188
34 votes
2 answers
196k views

What switches can robocopy use to preserve file and directory times on the target? [closed]

After using robocopy to copy files to a new drive I realized that all the file and directory creation times and been reset to the time of copying. Are there some switches to make robocopy keep the ...
vfclists's user avatar
  • 1,632
28 votes
11 answers
224k views

Robocopy: How to move the content of a directory but KEEP the directory

Simple task: Move all the content of the directory c:\Users\files\Desktop\test 2 to c:\Users\files\Desktop\test 1 C:\admin\temp>robocopy "c:\Users\files\Desktop\test 2" "c:\Users\files\Desktop\...
perler's user avatar
  • 531
26 votes
4 answers
47k views

Can Robocopy be made to skip open files?

We are using Robocopy to redistribute files which arrive via FTP in a drop folder. Ideally we want Robocopy to leave files alone if they are still being FTPd. Having tried various switches, Robocopy ...
domspurling's user avatar
25 votes
1 answer
37k views

robocopy is 20x slower than drag/droping files between servers

I am migrating 20TB of files between two servers. Both systems are Windows 2012R2 with latest updates installed. Both using gigabit network. Using robocopy on the new server with the command line ...
Grant's user avatar
  • 17.9k
23 votes
8 answers
59k views

The Job and Monitoring Options of RoboCopy

What does the Job Options of RoboCopy do? And what exactly does the /MON and /MOT switches do? How can I use them? I don't understand them, and can't find any examples on how to use them. /MON:n ...
Svish's user avatar
  • 7,117
20 votes
4 answers
44k views

Wildcard directory exclusions with robocopy -- weird case

I need to get robocopy to exclude any file whose path contains a directory with a particular name. For example, "bar": c:\foo\bar\a.txt c:\bar\c.txt d:\baz\bar\flub\d.txt should be excluded, but not ...
Jesse's user avatar
  • 1,910
20 votes
3 answers
11k views

On Windows: is it safe to do a robocopy in order to clone the system?

Let me start by giving a bit of a background. On Linux systems, I frequently rely on the fact that as long as I can get all files over from one hard drive to another, and as long as I fix up the boot ...
ixnaum's user avatar
  • 203
18 votes
1 answer
2k views

User accidentally messed up a Robocopy command and caused a bunch of folders to get created with corrupt security

We had a user run a robocopy command to copy some files but unfortunately the user accidentally messed up the syntax. Something like: robocopy "\\server1\share\Accounting" \\server1\share\...
TheCleaner's user avatar
  • 32.7k
17 votes
3 answers
40k views

Exclude only some files with the same name when copying using robocopy

I have a directory structure like this: folder1\ help.txt folder2\ help.txt folder3\ help.txt ... I want to copy the contents of folder1 using robocopy. For example: ...
Daniel Richardson's user avatar
14 votes
1 answer
112k views

What is a S-X-X-XX-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXX-XXXX called in Windows security?

I copied two trees, a source and a destination, that I copied with robocopy like this: robocopy /MIR C:\Windows\System32\tasks\ C:\temp\robocopyTasks\out\ robocopy /E /Copy:S /IS /IT C:\Windows\...
leeand00's user avatar
  • 4,909
13 votes
5 answers
21k views

Apparently Robocopy does not understand Windows Server 2016 deduplication. Is there a way to make it work without corrupting the volume?

Scenario: Doing a server migration from old Server 2008 R2 to new Server 2016, following this Server Fault guide: File server migration using Robocopy After Robocopy completes, enable deduplication ...
Dale Mahalko's user avatar
13 votes
4 answers
213k views

How do I get robocopy to use a log file which includes spaces?

I'm trying the following command: robocopy "x:\dir" "y:\dir" /mir /z /tee /fft /nfl /ndl /eta /log:"x:\path to logs\12-15-11 01 file with spaces.txt" I'm getting this error: ERROR : Invalid ...
slm's user avatar
  • 7,695
12 votes
4 answers
41k views

Why does RoboCopy create a hidden system folder?

I thought I would try out RoboCopy for mirroring the contents of a folder to another harddrive. And seems like it worked. But, for some reason, to see the destination folder I have to both enable Show ...
Svish's user avatar
  • 7,117
12 votes
3 answers
39k views

How do I use robocopy with a large number of excluded files?

I want to use robocopy to move a large number of files, except those that are in a whitelist. The whitelist contains approximately 150 files of different names. When I copy-and-paste the whitelist's ...
Fuzzy Purple Monkey's user avatar
11 votes
2 answers
37k views

Completely silent robocopy

I'm trying to robocopy some files silently. Right now, I have robocopy putting everything into a log file, which is fine, but after it finished, Log File: C:\<logfiledestination> is printed. My ...
CoV 's user avatar
  • 111
11 votes
3 answers
55k views

How do I use Robocopy to exclude ALL subfolders under a chosen folder?

I'm trying to use Robocopy in a way that excludes all subfolders under a chosen folder. In other words, I only want to target a folder and robocopy only the files within it but not it's subfolders. ...
dbl0ser's user avatar
  • 111
10 votes
1 answer
52k views

Can Robocopy be configured to only log the “errors”?

Can Robocopy be configured to only log the “errors”? On a large copy job, I’m really only interested in knowing what files were NOT copied.
Corey's user avatar
  • 2,051
8 votes
3 answers
26k views

Robocopy - Overwrite all files unless file in destination is newer

The title pretty much sums it up. I had restored a file share recently from a backup. Come to find out after about a day of users in production we started to notice some files were corrupt. Pulling ...
cvidal's user avatar
  • 89
8 votes
3 answers
15k views

How to get robocopy summary information involved in powershell?

I have a quick script written to compare file differences across servers, and then give a prompt for whether to mirror the changes. I'd like it to intelligently NOT prompt for copying if there aren't ...
jski's user avatar
  • 921
8 votes
1 answer
4k views

Robocopy - Exclude specific file from purge within subdirectory

I want to exclude a specific file from being deleted while still performing a purge. The specific file is located within a subdirectory that does not exist in source. Source: folder1\ file1.txt ...
Daeze's user avatar
  • 81
7 votes
2 answers
18k views

Automate Windows Robocopy with internal changes monitor /MON:1 option

The /MON:1 option works just great and run directory scan if only changes happened. This is something that is not possible to do if robocpy is ran from windows scheduler each 10 min. Is there a way ...
user34402's user avatar
  • 271
7 votes
3 answers
6k views

How to properly migrate file server data?

We are in the process of decommissioning our old file server in a much-needed upgrade. It goes without saying that this needs to be as seamless as possible, as to affect the end-users as little as ...
DKNUCKLES's user avatar
  • 4,028
7 votes
3 answers
4k views

Copying terabytes of hundreds of thousands of files in folder slow

I am currently running FreeNAS and using SMB 3 on windows machines to copy folders with 80000+ files that are all about 35MB each. Here is the config FreeNAS 2x40Gbps connections bonded connection ...
cohortq's user avatar
  • 475
7 votes
2 answers
24k views

What does my service account need to get around the error "Manage Auditing user right" in robocopy?

I am creating a scheduled task that calls robocopy from a script on Windows Server 2012 R2. It currently throws the following error regardless of it being run manually or from a scheduled task: ERROR ...
GeneBean's user avatar
  • 323
7 votes
1 answer
19k views

Using robocopy to copy missing files/folders to a destination path

I recently synchronised an external hard disk which had approx 1.4 TB of data copied over with a GUI sync application on a Windows based file server. Sync direction, left to right. The problem that ...
James White's user avatar
7 votes
3 answers
35k views

Combining RoboCopy with FtpUse

Our clients need to transfer specified files from their network to ours through FTP. The transfer must be invoked automatically whenever one of the specified files changes. For this purpose, RoboCopy ...
user1632306's user avatar
6 votes
3 answers
1k views

Backup with Mercurial and Robocopy?

The Problem We would like to backup our critical files from several network shares to a removable hard drive. We want to automate the backup so we don't have to remember to run it. It needs to ...
Andrew Neely's user avatar
6 votes
7 answers
52k views

Copy multiple folders to a single destination with robocopy

I'm looking for a solution to use robocopy to copy several folders from a directory onto a distant network share. I want to choose several folders out of a directory that contains hundreds of folders ...
SDGuero's user avatar
  • 228
6 votes
4 answers
24k views

Robocopy failure with Windows Server 2008 Scheduled Task

So I have a batch script for robocopy. Running this from the command line does exactly what I want. robocopy "D:\SQL Backup" \\server1\Backup$\daily /mir /s /copyall /log:\\lmcrfs4g\NavBackup$\...
CC.'s user avatar
  • 1,196
6 votes
5 answers
35k views

Server 2008 robocopy access denied to user folders + /B error I don't understand

This is a two-parter. A) Trying to do this in server 2008, with command being run by domain admin: Robocopy \server\c$\users D:\backupfolder /MIR I get "Access Denied" on all files in the user ...
Aszurom's user avatar
  • 463
6 votes
3 answers
53k views

Scheduled Robocopy task fails with 0x10 error

I'm trying to schedule a file-sync between two dedicated servers on a LAN. The remote machine is running Windows Server 2003 and the local machine is running Windows Server 2008. I mounted the remote ...
Petrus Theron's user avatar
6 votes
1 answer
2k views

Windows 2012 Robocopy with Deduplication active

Current Issue: File Cluster Disk of 14 TB Size needs an CHKDSK which can't be done because it lasts too long. So I'm going to replace this disk in the storage of the cluster. I run many times the ...
donduc_jr's user avatar
6 votes
1 answer
3k views

How to copy junction points on Windows XP?

I have tried several different tools in order to be able to copy junction points on Windows XP but none of them copied the junction point as junction point. All programs I have tried so far are ...
ceving's user avatar
  • 534
6 votes
1 answer
20k views

RoboCopy fails with "the specified network name is no longer available"

We have a scheduled task that runs robocopy periodically to mirror a rather large folder structure from one server to another (thousands of folders, 100,000+ files, 50+ GB in size). There is a share ...
Justin Scott's user avatar
  • 8,848
5 votes
6 answers
15k views

How do I use robocopy to list all files over a certain size recursively?

I feel quite silly, since robocopy is server administration 101; but I seem to be having a problem listing files. I desire to list all files over 10MB in size in the directory and subdirectory. ...
brandeded's user avatar
  • 1,860
5 votes
1 answer
109 views

Server OS or PowerShell version differences that would affect copy speed?

I recently moved many, many files at 2 different locations. It was exactly the same set of data on each, using an identical robocopy command, but what took under 30 minutes on Windows Server 2012 R2 ...
SQL_Deadwood's user avatar
5 votes
1 answer
13k views

Robocopy uses relative path for Source and Destination paths

I'm trying to use RoboCopy in my TFS Build Template to copy some files, but for some reason it inserts "C:\Windows\system32" in front of my Source and Destination paths, even though I am passing in ...
deadlydog's user avatar
  • 438
5 votes
2 answers
34k views

Robocopy, do not overwrite existing files, but copy the changed / new ones

Is it possible to mirror the two directories without overwritting the files in destination directory with new/changed/deleted files. Something like snapshots. Example: Copy the source directory with ...
I don't know.'s user avatar
5 votes
2 answers
12k views

Robocopy from list.txt

I have a ton of user directories, that I need to move along with permissions to another location, the command I use on an individual basis is : robocopy "\filer\home" "h:\UserHome" /E /SEC /Copy:...
JJJJNR's user avatar
  • 870
5 votes
3 answers
10k views

Why did robocopy cause my Windows 2012 server to hang last night?

I'm in the process of decommissioning an old 2003 server, which acts as a file server, and am just attempting a dry-run of migrating the file repository over to a new Windows Storage Server 2012 box. ...
kafka's user avatar
  • 547
5 votes
2 answers
4k views

Roaming Profile Permissions and Migration

Currently a client as 2003 DC and we are migrating them to a 2008R2 on a 2012 Hyper-V Host. They have a handful of roaming profiles - but with the usual setup - i.e. the only permissions on the actual ...
PnP's user avatar
  • 1,684
4 votes
2 answers
36k views

Robocopy cannot find specific directory

I am migrating our file server from 2008 to 2012R2. Currently i am trying to copy all folders and files to our new server but the command isnt working correctly. Here is what i am using: robocopy G: ...
SenorWaffels's user avatar
4 votes
2 answers
41k views

File server migration using Robocopy

I plan to migrate a file share from Windows server 2003 to Server 2012 R2 (It has more than 500 GB of data. FYI - It does not have DFS). I thought of using below command for copying the data from ...
Bineesh's user avatar
  • 43
4 votes
4 answers
11k views

Robocopy really slow across LAN

DISCLAIMER: I'm a programmer, not an admin! I am setting up web apps in a new server cluster and copying files using xcopy or robocopy and UNC paths between servers on the same subnet is really slow. ...
Brian Donahue's user avatar
4 votes
3 answers
26k views

Using ROBOCOPY to MOVE data around, not copy it

I have the following powershell script, which executes a few robocopy commands: ROBOCOPY.exe $q3 $q4 /R:5 /W:15 /S /NP /MT:32 /XA:SH /XJD ROBOCOPY.exe $q2 $q3 /R:5 /W:15 /S /NP /MT:32 /XA:SH /XJD ...
Nate's user avatar
  • 2,151
4 votes
6 answers
3k views

Looking for a faster way to transfer file to a windows network share

Update: This is just for one way transfer. No need to sync. I am currently using Robocopy to transfer a huge file which is zipped and send to a remote network share. Is there a faster tool? Lately, ...
Gulzar's user avatar
  • 381
4 votes
3 answers
9k views

Robocopy /xd with wildcards and sub-paths

I don't think this exact question has been asked before (I looked). My backup server runs a script using Robocopy, and I want to exclude files that don't really need to be backed up, specifically: *\...
nerdfever.com's user avatar
4 votes
1 answer
11k views

Robocopy falsely marks files as newer

I have two NTFS formatted drives on different machines and I do a robocopy mirror between them like this: robocopy "D:\My Documents" "X:\Backup\My Documents" /MIR /V /NP /XD .* /XO /XA:SHTO /FAT /Z /...
Cinaird's user avatar
  • 141

1
2 3 4 5 6