Skip to main content

Questions tagged [robocopy]

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

189 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
9 votes
0 answers
1k views

How to make robocopy delete excluded files in destination directory

I have a cross-platform build toolchain which copies some folders to destination. I use robocopy on Windows and rsync on macOS because they support console progress output. The commands were in this ...
dmitry1100's user avatar
7 votes
0 answers
5k views

Robocopy loops/nests "Application Data" 29 times when copying "Application Data" folder on Windows 10

My goal here is to be able to back up my entire computer by using robocopy. My robocopy script keeps getting stuck here as you can see with the Application Data. C:\Documents and Settings\All Users\...
CreativiTimothy's user avatar
6 votes
0 answers
11k views

ROBOCOPY /MIR (or /PURGE) follows and deletes target symlinks

Let's say we have a folder SOURCEDIR to be synchronized with TARGETDIR. The problem: if TARGETDIR contains directory symlinks, ROBOCOPY /MIR (or /PURGE) will follow the symlink, and delete every file ...
Andreas Spindler's user avatar
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
4 votes
3 answers
14k views

RoboCopy unable to copy between a server on a domain to a computer in a workgroup

I have a RoboCopy problem and here is the scenario. My server is running Windows Server Essentials 2012 R2. My laptop is running Windows 10 Technical Preview. The server is running as a domain ...
Stefán Jökull Sigurðarson's user avatar
3 votes
0 answers
750 views

Robocopy always detects files as "newer" if destination is OneDrive synced

I'm trying to use robocopy to mirror files from a CIFS file share to a SharePoint library via the OneDrive sync client. Something I've noticed is that all the files get re-copied each time I run ...
Yoshi Walsh's user avatar
3 votes
2 answers
2k views

How to get ROBOCOPY to throw an error when there's denied access

I am using ROBOCOPY to copy some files from folder A to folder B. I have purposefully made folder B inaccessible using NTFS permission to throw an error so that it can take a different action when ...
JuniorPenguin's user avatar
3 votes
2 answers
3k views

Robocopy: destination folder size is bigger than source folder size

I've backed up my windows profile folder to external hard drive with the following command in batch file: robocopy %userprofile% %~dp0src\dest /b /mir /mt /r:1 /w:5 >nul After the copy was ...
qwaz's user avatar
  • 163
3 votes
0 answers
1k views

Cannot find Robocopy error in log file

I have a robocopy .cmd file running on windows 10 64-bit (French version) and I keep getting an error at the end of the log file in the summary section: Total Copié Ignoré ...
gauss76's user avatar
  • 51
3 votes
2 answers
5k views

Robocopy - Is there anyway to copy upper & lower case file/folder renames?

Is there a command-line option or any way to get Robocopy to detect case changes/renames in files or folders on Windows? For example, If I rename source file 'example.txt' to 'Example.txt', Robocopy ...
jtbrown3's user avatar
3 votes
1 answer
6k views

Robocopy copying files from source to destination in backup mode and with file security permissions intact

I need to use Robocopy to mirror files and folders from one shared location to another, in restartable backup mode with security permissions. My current command is: robocopy \\sourceServer\src \\...
user avatar
3 votes
0 answers
3k 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 ...
Warszo.Sertz's user avatar
2 votes
0 answers
73 views

The same robocopy command is extremely slow on one computer and very fast on the other

I am facing the problem that the same robocopy command has totally different execution times on two different computers. The source is a Windows Server 2016 Standard. There is a directory with approx. ...
Grimm's user avatar
  • 121
2 votes
0 answers
1k views

How to make ROBOCOPY /MIR actually mirror properly when excluding files/dirs?

I have this test dir structure: ├───dir1 │ New Text Document.txt │ thumbcache_123.db │ └───dir2 New Text Document.txt thumbcache_123.db If I run this command: ROBOCOPY &...
Advit's user avatar
  • 61
2 votes
0 answers
773 views

Why does calculating folder sizes with Robocopy.exe give me different results compared to Get-ChildItem?

I have this Function that takes a path input, and gives you the size of it. There are 3 different options you can choose from which are: 'GCI' - Get-ChildItem 'DIR' - CMD's DIR command 'ROBO' - ...
Abraham Zinala's user avatar
2 votes
1 answer
76 views

Copy files except when destination modified in last x days

I think what I am trying to do is simple, but I can't get the robocopy settings right, as I am trying to copy files from src to dest, over-writing files in dest if they already exist, except if ...
Mark Schultz's user avatar
2 votes
1 answer
5k views

Robocopy: how to copy all files in folder newer than a specific date (including older files)

There is this option in Robocopy: /maxage: Specifies the maximum file age (to exclude files older than N days or date). In my case, i want to copy all data put into a new folder being created ...
Phong Tran Dang's user avatar
2 votes
0 answers
375 views

Working with source files while Robocopy is running

I need to make a backup of my entire Users folder from within Windows, but I also really need to be able to use my computer normally. I'm planning to use Robocopy for this purpose, and want to clarify ...
Hashim Aziz's user avatar
2 votes
0 answers
10k views

Robocopy to copy files and folders to and fro between a location on Windows and UNIX

Using Robocopy to copy / move files and folders from one Windows server to another is pretty much a possibility. But can Robocopy be used to do the same across different OS ? i.e. transfer files from ...
Yash Saraiya's user avatar
2 votes
0 answers
2k views

Why does robocopy still try to copy Thumbs.db even with XF option?

Using robocopy (version 10.0.10586.0) on Windows 10 to copy files from one drive to another using the following command: ROBOCOPY c:\src D:\dest /MIR /COPY:DT /DCOPY:T /XJ /XF Thumbs.db /XD "$...
User's user avatar
  • 3,747
2 votes
0 answers
782 views

is robocopy over a network share secure against eavesdropping?

IMHO using robocopy for copying files to a remote windows network share should use the encrypted channel provided by windows file sharing ove a network. Can anyone confirm? Thank you.
Pinco Pallino's user avatar
2 votes
1 answer
6k 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 ...
Mansoor Ahmad's user avatar
1 vote
0 answers
26 views

How can I move a folder without encountering issues related to cyclic folders and excessive disk space consumption?

I'm using the following command to move a folder: robocopy "C:\Users\TTHCMM" "D:\C_Drive\Users\TTHCMM" /E /MT:32 /NFL /NDL /NJH /NJS However, I've noticed that this command can ...
william007's user avatar
1 vote
0 answers
47 views

I do not understand robocopy report

I am using the following command: robocopy "h:/.backup-ship/" "../.backup-ship/" /MIR /NDL /MT robocopy report writes: I do not understand the row "Files". Should not ...
g.pickardou's user avatar
1 vote
2 answers
4k views

Deleting Files Older than 30 Days with Robocopy

I want to delete files older than 30 days via Robocopy. Robocopy C:\EmptyDir C:\FullDir /mir /MT /R:0 /W:0
Cell-o's user avatar
  • 421
1 vote
0 answers
1k views

Purpose of xcopy over robocopy

From what I've found online, robocopy seems to be xcopy with more features; are there any scenarios where someone would want to use xcopy over robocopy?
Meester Moo's user avatar
1 vote
0 answers
46 views

Why does Windows Explorer change the 'Folder Modify Time' when first accessing a folder after a robocopy?

I am attempting to use Robocopy to mirror a directory structure (/e) and keep created/modified/accessed times. This should be fairly simple with '/copy:DAT /dcopy:DAT' and appears to preserve the ...
Chuu's user avatar
  • 763
1 vote
0 answers
1k views

Robocopy Error 53 when not logged in. When logged in, Robocopy runs successfully

We run a nightly scheduled task that copies files from a local drive to a network share. When I'm remoted in to this machine using any account, Robocopy runs fine. When I'm not logged in, Robocopy ...
OSeRAcKB's user avatar
1 vote
0 answers
77 views

Robocopy not logging folders

Robocopy is randomly not logging folders in the log. I'm using exactly the same switches but copying the same or different folders. See picture at bottom.. I used: robocopy "F:\folderSample2&...
Antonio23249's user avatar
  • 1,031
1 vote
1 answer
246 views

robocopy only copy recent files, not recent folders

I had to create a copy of the file structure from a fileshare using robocopy C:\something D:\something /E /EF *.* I now just have all the folders, no files. Now, I just want to robocopy files that ...
saleetzo's user avatar
  • 163
1 vote
0 answers
687 views

Modify Powershell script to to copy from multiple sources to a single destination using Robocopy

want to write a script (preferably in PowerShell) to copy (robocopy) files from multiple directories to a single destination. I am able to do this for a single source directory. But need help to ...
AbP's user avatar
  • 48
1 vote
0 answers
507 views

Copying large file with robocopy during remote-desktop session failed with ERROR_OPERATION_ABORTED

Today, it was necessary for me to copy a rather large file from one PC A to another PC B. I'm using Windows on both PCs, so that I thought robocopy would be the tool of my choice. The file was about ...
Aleph0's user avatar
  • 121
1 vote
0 answers
464 views

What does robocopy /XC actually do?

The robocopy documentation from Microsoft states that the /xc flag/switch means robocopy "excludes changed files". But what does that really mean? I tried to test this with the following example: I ...
Arete's user avatar
  • 1,478
1 vote
2 answers
1k views

Robocopy And Using Variables In Powershell

I am trying to set up a robocopy job in powershell that copies files to a destination directory using an array and a variable. I want it to use a specific value based on the current date. Here is ...
JT-66's user avatar
  • 13
1 vote
0 answers
503 views

Robocopy log combining two file paths with "*EXTRA FILE"

I have a robocopy command that I use to backup files from a local Windows based home server to an external hard drive. The command I use to backup and log files is as follows: robocopy "F:\DATA" "W:\...
HTWingNut's user avatar
  • 509
1 vote
0 answers
368 views

Robocopy ignores files that have the exact same size and timestamp (Truecrypt volumes)

I'm backing up my documents, including a small Truecrypt container (.tc file). When I mount the Truecrypt countainer and modify files inside it, it does not change the file size or the date/time ...
Jim's user avatar
  • 543
1 vote
1 answer
2k views

Robocopy Hangs / Gets Stuck - Move to Next File Command/Timer?

I have an issue when I utilize Robocopy. I have a fairly homogeneous directory and I am trying to move it from one drive to another. The drive where the files reside must be corrupted. I would ideally ...
jo452's user avatar
  • 11
1 vote
1 answer
5k views

Compare two directories to check which files are missing on the destination path with Robocopy?

I have two directories with the same name and same sub-folder names. I am running this command: ROBOCOPY “Source 1” “Source 2” *.* /L /NJH /NJS /NP /NS /log:reconcile.txt But it shows me new files ...
Motestfilter's user avatar
1 vote
1 answer
460 views

Robocopy Files and Folder Missing

I am using the following robocopy command. ROBOCOPY "C:\Users\Office\Pictures\Drew\Family Pictures" B:\Backup /S /E I can never find the files after they are copied. Robocopy see the files because ...
user1065647's user avatar
1 vote
1 answer
2k views

Batch file to copy folder to all users network home directory

I'm looking to create a batch file copy a folder from \\server\folder\subdirectory to \\server\users\username\folder. I don't want to have hundreds of lines for all the users. I there a simpler wild ...
Nick's user avatar
  • 11
1 vote
0 answers
99 views

robocopy exclude subfolders with unknown name

I want to copy some folder structures that look like +[a] +[b] | +[R] | | +[xyz] | | +[abc] | | + a | | + b | +[D] | +[xyz] | +[abc] | + a | + b +[c] +[R] | +[123] | | + 2 | | + 3 ...
vlad_tepesch's user avatar
1 vote
1 answer
1k views

incremental backup with robocopy not working with ms access files

I'm looking for incremental backup of one of my folders in my USB flash drive to my pc I'm using a ROBOCOPY command and has scheduled it on log on event through task scheduler Here's the code I'm ...
junaid's user avatar
  • 11
1 vote
1 answer
637 views

Robocopy /fat option

I'm trying to copy server files to sharepoint and there are a lot of files and folders that have full sentences as names and as such, when I try to copy these files into the sync folder on the server ...
XanderXIV's user avatar
1 vote
0 answers
3k views

External hard drive (USB 3.0) disconnects after half an hour when robocopy is copying large files

I'm constantly facing the same issue, that I'm not able to successfully copy files from one internal drive to an external drive. I'm using robocopy with this command robocopy D:\ F:\ /e /zb /np /copy:...
testing's user avatar
  • 869
1 vote
1 answer
473 views

Unable to delete deep folder structure

I am unable to remove a very deep directory tree. When I try to delete it normally, it just stays at 0% and nothing happens. I have tried using the robocopy method with /purge, which ran for over 1 ...
Ahnson's user avatar
  • 11
1 vote
1 answer
1k views

Make robocopy skip offline computers in text-file

I'm trying to write a batch file that will robocopy a msi file from a server to all the domain PCs that are online at that time. It should skip PCs that already have the file listed and PCs that are ...
Maarten's user avatar
  • 21
1 vote
0 answers
3k views

Robocopy does not overwrite when copying a single file, even with /IS

I can't make robocopy to overwrite a single file, even with the /IS flag on: C:\>robocopy.exe "\\srv1\D\SRCFOLDER" "\\srv2\D\DSTFOLDER" "test.txt" /IS I always got: Total ...
StefanoV's user avatar
  • 111
1 vote
0 answers
4k views

100% CPU usage of robocopy and system

I was just running robocopy but both robocopy.exe and "system" together have 100% CPU usage, as shown in the snapshots in process explorer (Robocopy.exe's threads and system's threads). The ...
foo_bar's user avatar
  • 11
1 vote
0 answers
103 views

Robocopy 3.1...not accepting my target destination

When I enter my source and destination locations, Robocopy puts my source and destination on the same line. The log says that no destination directory is specified but I specify it in the GUI. I ...
jcchase3233's user avatar
1 vote
0 answers
1k views

Windows: How to copy specific subfolders and keep folder structure?

I have many sub folders in root folder, they are structured in year \ month \ day way, e.g, root_folder \-A folder \--2012 <--- year \--01 <--- ...
TRX's user avatar
  • 180