Questions tagged [robocopy]
Robocopy (or "Robust File Copy") is a command-line directory replication command.
501
questions
1
vote
1
answer
451
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 ...
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?
0
votes
1
answer
521
views
Interpreting Robocopy logs
I'm using robocopy to copy a folder:
Robocopy "F:\Users" "G:\Users" /MIR /R:5 /W:15 /MT:32 /V /XA:O /XJD /LOG:G:\Backup.log
What's the meaning of these terms in the log?:
Modified
...
1
vote
2
answers
1k
views
Robocopy issues with symbolic links and output log file
I'm trying to robocopy these folders for a Windows 10 system drive I attached externally):
The full User's folder
The full Windows folder
I know more or less how to do it, but my doubts are these:
...
2
votes
3
answers
599
views
Robocopy move old files instead of override
I'm really new to robocopy and can't find if my idea can be realised.
I want to make a backup folder let's say destination "backup". But every time robocopy finds a file different from the ...
6
votes
1
answer
18k
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?
0
votes
1
answer
2k
views
What are junction points for files (instead of directories)?
According to https://ss64.com/nt/mklink.html, junctions cannot link to files. Also, when I try this nevertheless with mklink /j junction-file target\foo.txt, the command will succeed, but the junction ...
0
votes
0
answers
119
views
How do I properly sync data between two Windows 10 systems on the same LAN utilizing Robocopy, a .bat file, and Task Scheduler?
I've read a number of posts regarding the use of robocopy to sync data between two Windows systems. I tried various configurations, and the settings I currently have in place are what seemed to work ...
1
vote
1
answer
421
views
What is the closest thing to a logical disk image with Robocopy or similar tool?
I have an old 2 TB drive that seems to be on the way to electronics heaven. It's not make scary noises, but Windows 10 failed to mount it until it ran a multi-day checkdisk. Besides that, it's close ...
0
votes
1
answer
178
views
Does using command line robocopy effect drive life?
I use the cmd command "robocopy" to back up a folder on an ssd to an internal backup drive though a bat file. The command I use:
robocopy "X:\Source Folder" "P:\Backups\Source ...
1
vote
1
answer
243
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 ...
0
votes
1
answer
3k
views
Robocopy copied Delta files to another location
robocopy is a great tool for making full/incremental copies and I like to use it for Backups.
One thing, I still haven´t figured out: How to treat the Delta files specifically
Situation:
Source A is ...
1
vote
2
answers
5k
views
rsync-like copy command on windows
tl;dr
I'm looking for a near-exact replacement for rsync --recursive --update on vanilla Windows.
details
What is a command, in Windows, that works like:
input:
a filesystem pattern (restricted to ...
0
votes
1
answer
982
views
Trying to parse a string that I generate in a batch file into a few values of an XML file
I'm trying to create V2 of my little batch file. I only know batch , so I'd prefer to do this if possible instead of powershell but if I have to, I have to.
The app just copies five files that are the ...
0
votes
0
answers
1k
views
Reducing Command Priority: Robocopy Slows System
How can I prevent Robocopy from slowing other processes to a near standstill?
I have a Windows 10 batch file running Robocopy, once per hour, to mirror one drive and to copy changed files on another ...
0
votes
0
answers
179
views
Robocopy started hidden with vbs script not showing exit codes in Task Scheduler
Trying solutions here and here works fine, except in Task Scheduler Last run result always shows as The operation completed successfully. (0x0) instead of 0x2 or 0x3 without vbs:
Is it possible to ...
3
votes
2
answers
3k
views
robocopy: copy only newer files whose older version are already in the destination folder (updating files, not folder)
To update the files in the destination folder, I'd like to copy only the newer files whose older version are already in the destination folder.
I don't want to copy any files that are in the source ...
2
votes
1
answer
65
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 ...
0
votes
1
answer
56
views
Applying one command to list in text file
Assuming I have a list of PCs in a text file, how would I go about running the same command on each pc in the list?
For example, say my list is this:
ln1
ln2
ln3
ln4
And my command is this:
...
2
votes
1
answer
283
views
robocopy ignores modified files
I'm cloning a directory with robocopy. My intention is cloning everything, purging extra files in the destination and also overwriting files that are the same according to size and timestamp (/IS ...
0
votes
0
answers
435
views
WIll Robocopy copy and replace files if they become corrupted?
I have Robocopy set up to copy files to a network storage location from folders on a Hard Disk. In the event of some sort of issue with my HDD, where the files become corrupted, will Robocopy copy ...
1
vote
0
answers
611
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 ...
2
votes
1
answer
16k
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 ...
0
votes
1
answer
72
views
How to schedule a backup for only the new added files?
I'm a Windows user and wondering: how can I do a backup for the files on a specific folder if the files are not older than x days? Or to backup only the newly added/modified files without doing a full ...
1
vote
1
answer
4k
views
Hows to force robocopy to produce less verbose output
I have a short cmd file I run every day to back up any new or updated files/folders from sys1 onto sys2. The line within that file that I use right now for the backup is:
start /w robocopy \sys1\data\...
1
vote
1
answer
1k
views
A directory with same name already exists in this location
I am trying to create a folder with name, let's say, phantomdir but I am getting a dialogue that says, translated, "A directory with same name 'phantomdir' already exists in this location. Do you ...
1
vote
2
answers
2k
views
Batch file continues to run command after Task Scheduler stops it
I have a scheduled task running at 00:00 that opens a .bat file containing a robocopy command, with the task set to stop after 4 minutes, and to force stop if not ending when requested.
It seems the ...
1
vote
1
answer
581
views
Robocopy deletes skipped files in destination when mirroring
When attempting to mirror two folders using Robocopy, the option /MIR causes files in the destination to be deleted when the source files are in use. Specifically this happens when backing up my ...
0
votes
2
answers
780
views
Get-ChildItem in Robocopy not working as expected
I'm looking to find all .jpg files in D:\ZZZ_Phone_test and its subdirectories and then have Robocopy to copy those to D:\ZZZ_Phone_test\1\1\BackUp\ (which needs to be excluded because it is within ...
2
votes
1
answer
4k
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 ...
1
vote
0
answers
481
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 ...
0
votes
0
answers
308
views
Windows 2012 copy millions of small files
I have to copy about ~12 millions of small files (less than ~100kb e/o) from one VM with W2012r2 to another VM with W2016, using a dedicated gigabit NIC.
I need to do an initial copy of all these ...
18
votes
2
answers
13k
views
What does "robocopy /NOOFFLOAD" do?
The windows tool robocopy has a command line switch /NOOFFLOAD. What does this switch actually do, and under what circumstances would I use it?
The documentation for the switch says
/NOOFFLOAD :: copy ...
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\...
4
votes
1
answer
941
views
Robocopy Long File Name
Windows 10 run in our users' company PCs, long path name errors appears to them while trying to transfer files from the PCs to the windows server 2016
Users do not want to Flatten the folder ...
0
votes
2
answers
2k
views
XCOPY only files from a parent folder and from all its subforlders to a new folder in Windows?
I was searching a lot of times how to copy all the files of different extensions from a folder and all its subfolders to a new folder without copying the folders itself using Batch File. I mean ONLY ...
0
votes
0
answers
844
views
Robocopy, large files slow down multiple thread copy
For robocopy, can I have other unused threads move on to another file without waiting for the other threads to finish? I tend to notice that when I am copying files with one larger file, one thread ...
2
votes
1
answer
3k
views
robocopy batch file is giving Error codes 2 and 3
I have a batch file to get robocopies of rar files from different places it used to work just fine but recently it is giving me error code 2 and 3 but the robocopy is working Fine I didn't even change ...
0
votes
1
answer
489
views
Is it possible to skip and send email alert if the Robocopy MIR operation is going to copy more than 100 files
Please help, I need the script if the robocopy is going to MIR more than 100 files it should send alert and stop MIR operation. If it is less that 100 then it can perform the MIR operation.
0
votes
1
answer
733
views
Robocopy log file - bad formatting
On: windows-10 Pro x64 and Robocopy.exe 10.0.17763.1
Batch .bat file runs Robocopy to backup my user direrctory on C: to H:
C: is SSD formatted HTFS, H: is HD formatted HTFS
Command in the batch ...
1
vote
1
answer
252
views
What is the correct RoboCopy command for my intended sync job?
I've never used RoboCopy before and I'd like to make sure a particular operation goes smoothly. I've built an OpenMediaVault NAS and I previously copied all my relevant files to it from my Windows 10 ...
1
vote
1
answer
821
views
How to use robocopy with exclusions
I am using robocopy to copy folders and files from source to destination.
origin_path:
folder1
folder2
folder3
file1.txt
file2.log
file3.png
dest_path:
folder_important
folder1
folder2
this is ...
1
vote
0
answers
443
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 ...
3
votes
2
answers
2k
views
Robocopy reports less than 100%
I'm using robocopy to copy a large number of files (300,000 files totalling around 4TB) from one NAS drive to another. Here is a sample command:
robocopy \\nas1\myfolder \\nas2\myfolder /E /R:1 /W:5
...
3
votes
1
answer
3k
views
Why does the trailing slash on the target confuse robocopy?
Why does the following robocopy command get confused? Remove the trailing slash from the dest ("S:\Temp Backup") and it works as expected.
robocopy "S:\Temp\" "S:\Temp Backup\" /mir /ndl /mt /r:0
...
3
votes
0
answers
709
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 ...
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 ...
0
votes
1
answer
2k
views
Robocopy: How do I copy files that do not exist in the destination, but copy them into a directory other than the destination?
Let's say my destination directory already contains some files. My source directory contains identical files PLUS some extra files that are not in the destination and I want to copy these extra files.
...
2
votes
1
answer
3k
views
Batch File for Extracting File Path and File Name from Log file
I am really trying to figure this out, so bear with me, and thanks in advance for any assistance. I'm still struggling with understanding proper use of FOR /F "Delims" and "Tokens".
EDIT: Ultimately ...
1
vote
0
answers
488
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:\...