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
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
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
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. ...
SE145TH's user avatar
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 ...
HTWingNut's user avatar
  • 509
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
3 votes
2 answers
2k views

issue with robocopy on copying files from source to destination of longpath

I am using robocopy $source $destination /MIR, the thing is it does copy files in sync with the source but skippnig the files and directories from source which are having long path names. i would ...
E PSVP LIFE's user avatar
0 votes
1 answer
705 views

Use PsExec to run robocopy

Hi I'm currently making a script that copies a directory to another. I'm currently using this: robocopy $splunkconfig 'C:\Program Files\SplunkUniversalForwarder\etc\apps' /is /it /copyall /mir But ...
Alexander Espiritu's user avatar
0 votes
1 answer
47 views

How do I write this in my batch script?

The command is robocopy M:\Tech_Supt\$Software\Open Way & Motion PC files and Config\OpenWay Install Objects\ C:\OpenWay Install Objects\ /e The path is awful due to the spaces and & ...
Greg Arnason's user avatar
1 vote
1 answer
3k views

How to let Robocopy remove extra file first

I use Robocopy src dst /MIR /NFL /NDL /NJH /NJS to backup src. It says target hard drive doesn't have enough space during the process. The target indeed have enough space, since a lot of files in ...
jw_'s user avatar
  • 862
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
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
0 votes
1 answer
512 views

How to robocopy *.doc but not *.docx

With robocopy D:\OLI1 E:\t95\oli1 /s "*.doc" I want to mirror all Word 95/2000 documents into a folder tree. Unfortunately this copies all docx-Files, too, as robocopy handles this like the file ...
olippuner's user avatar
  • 121
0 votes
1 answer
705 views

Robocopy - Copy Changed Files to Multiple Locations

I have used Robocopy to backup files from my home server for years. It's a simple /MIR switch. However, what I'd like to do is not only update the destination folder, but also copy those same new ...
HTWingNut's user avatar
  • 509
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
0 votes
1 answer
268 views

Changed Robocopy script from network share to local share and it stopped logging

Original working code that copied files from one server to another and logged the activity Line 1: net use Y: "\\192.168.100.94\SQL_Backups" Line 2: net use Z: "\\192.168.100.94\SQL_Backups_Logs" ...
JonDoeCA's user avatar
  • 101
0 votes
0 answers
331 views

ACLs with robocopy

I am trying to copy data from a Windows Server 2012 R2 to a QNAP NAS(ext4). I use the /MIR switch and I want to keep the ACLs on files and sub-folders unchanged. The problem is that the ACLs in the ...
Andro Samy's user avatar
3 votes
2 answers
376 views

migration from server 2008 to 2012 R2 using Robocopy

I have old file server running Server 2008 and I have new file server that will be replaced it running 2012 R2. They're both under the same AD . I have copied one share already using: robocopy \...
WonderManIT's user avatar
0 votes
2 answers
739 views

copy a specific filetype from multiple subfolders into one folder

I want to copy from a folder with several subfolders all csv files to a single folder. But I only want files that are not older than 30 days. This is what i have so far: for /R C:\Source %%f in (*....
crillez's user avatar
1 vote
1 answer
3k views

Windows 10 cmd prompt: cannot use German u-Umlaut (ü) in paths, and changing the code page strangely doesn't work

On my Windows 10 machine I am trying to run a "robocopy" command to backup files. Everything is fine as long as the paths (to folders to backup) do not contain letters like ö, ü, ä which ...
Christian Geiselmann's user avatar
1 vote
2 answers
929 views

How to copy directory stucture, folders, sub-folders, files properties,metadata wihtout copying the actual content of files?

Softwares like DirLister, Snap2HTML I have a external disk of size 2tb,, and laptop with 500gb SSD and free time at work.. Copy Volume Shadow of External Disk, just directory structure and files, ...
hasoma's user avatar
  • 21
0 votes
1 answer
2k views

robocopy: excluding directories

I use robocopy to back up files. Because I need to exclude some directories, I tested the following switch first: /xd dirs t* It successfully excludes all directories whose name starts with t. That ...
joehua's user avatar
  • 287
2 votes
2 answers
2k views

Robocopy - Possible issue while logging output?

I am evaluating if Robocopy will be a good option for me for my backup script that will take backup of only newer files from C drive (NTFS) to a Pendrive (exFAT). I have this command that I am ...
rajeev's user avatar
  • 1,698
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
10k views

How to copy entire folders/directories in command prompt?

My laptop isn’t booting, so I’m running a Windows ISO off a DVD and attempting to backup some files to an external hard drive plugged into the USB via Command Prompt. With command prompt I can enter ...
M. Guillaume's user avatar
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
2 votes
2 answers
4k views

Robocopy switches for incremental drive backup?

I have two hard drives: G: is an external USB drive connected to a Windows 10 PC H: is a network drive (another USB drive connected to the USB port of the home network router's USB port) I have ...
Jim_1234's user avatar
  • 111
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
0 votes
1 answer
115 views

Need To Compare Files In Directory And Delete Similar Files (but it's more complicated than the norm)

so I have a rather odd need in my work environment and I'm having a lot of trouble figuring it out. I'll try to make this as short and sweet as possible, but explaining some background is key as to ...
Planedrop's user avatar
-1 votes
1 answer
1k views

Robocopy - Copy File If New and Rename

I have a single backup file that gets created hourly, lets call it AUGUST.backup, I wish to create a Robocopy script that when ran will check the backup folder for new files, and if there is a new ...
conrad9900's user avatar
0 votes
0 answers
43 views

Strange Robocopy behavior in directory mirroring

I use robocopy to keep some directories synchronized between two iSCSI attached arrays on a Windows Server 2012. I have noticed strange behavior in Robocopy and have done a test. I created a script to ...
Marcelo Magalhães's user avatar
0 votes
1 answer
215 views

Best language/system to auto-batch copy files & dir's with file rename in Windows 8/10?

Robocopy came so close, but is missing file rename on copy. So could people please direct me to a language or system in Windows that would be well suited to the following : This is meant to be a ...
Jim_1234's user avatar
  • 111
2 votes
1 answer
547 views

Why does my Robocopy always copy one file but not the other?

Trying to learn Robocopy for a basic backup plan, and I tried this in a bat file: @echo off echo "Hello World!" robocopy C:\Testfolder Z:\Testfolder pause where Z: is a network drive (a usb external ...
Jim_1234's user avatar
  • 111
0 votes
0 answers
41 views

Robocopy switches to make new copies of existing files?

This is for a very basic backup plan. Imagine that a full copy of c:/myfolder (and all its sub-folders) has already been created at d:/myfolder. Is it possible to use Robocopy as a daily/weekly job ...
Jim_1234's user avatar
  • 111
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
0 votes
1 answer
499 views

Robocopy Error on local path?

When I run the file, it errors out and says "The filename, directory name, or volume label syntax is incorrect. My file is just one line for now to test and goes like this: @echo off robocopy "C:\...
Mike Mccue's user avatar
3 votes
1 answer
7k views

Robocopy copy directory instead of just its content

Simple question, no obvious solution. I have a folder called Test on the C drive (C:\Test). I have a folder called Test 2 on the D drive (D:\Test2). I want to robocopy the Test folder to the Test2 ...
user avatar
0 votes
0 answers
134 views

Can you move a directory while data is being copied to it

I have a large set of data that is being copied to a directory on a server, around 2 tb. I would like to start moving this data(Ctrl-X) from server A to server B to save time and space on server A. ...
davedno's user avatar
  • 129
1 vote
1 answer
4k views

Copying files based on creation/modified date

I have a question about backing up files from the command line. We have a shared folder (stored on one of the computers) in the office containing several thousand files and subfolders. Until now, I've ...
stoyian0v's user avatar
0 votes
1 answer
6k views

Robocopy skips one directory although it looks like everything is transferred

I am trying to copy a large amount of data to a databox (~10 TB). I am using robocopy with this command: robocopy <source> <destination> * /e /r:3 /w:60 /is /nfl /ndl /np /v /MT:32 or 64 /...
Lane Messier's user avatar
1 vote
1 answer
1k views

Robocopy, How to exclude all files except one

I have setup an Azure pipeline, that runs on an op-premises agent, that performs Windows Machine File Copy task, which uses Robocopy to copy files from my computer to a remote server. The copied ...
G. Siganos's user avatar
0 votes
1 answer
802 views

Compare files using robocopy in for loop

Problem I want to solve: Compare files in one directory to files in a subdirectory. If they match, delete the file in the top directory. This is for Windows and I would like to use Windows Batch ...
Registered User's user avatar
0 votes
1 answer
11k views

Moving files to FTP in batch file and delete source files

I need to create batch script for copy files from PC to FTP server. After copy - delete all files from source. And in destination directory overwrite all existing files. I found many solutions, but I ...
David's user avatar
  • 13
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
4 votes
1 answer
5k views

Robocopy error 87 during copy and backup PDF files (to exFAT micro-sd card)

I am trying to set up mirroring with robocopy to backup directories to micro-sd cards, as: ROBOCOPY "C:\test" "E:\test" /MIR /COPY:DT /Z /W:5 This works fine for the most part except for PDF files ...
mikej's user avatar
  • 41
0 votes
1 answer
6k views

Copy files with full relative path in Windows

I have a large set of files (45,000+) in a pretty complex folder structure. I extracted a subset of ~13,000 files and their paths (relative to the root folder) that I want to copy with the original ...
mrgou's user avatar
  • 251
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
0 votes
0 answers
91 views

rsync -avzh /media/sdx/* /media/sdy/ --delete --recursive --links, what is wrong here?

Rsync is giving me trouble. I use it for a decent backup. I wasn't able to make it match ROBOCOPY.exe. rsync -avzh /media/sdx/* /media/sdy/ --delete --recursive --links It seems to copy all and ...
user978927's user avatar
0 votes
1 answer
394 views

Cannot copy Macrium Reflect mrimg file using Windows command line

I created full system backup of my Windows 10 PC using Macrium Reflect and it created a .mrimg file of around 400 GB. This file is stored on an external hard drive (HDD). I want to copy it to another ...
Curious Leo's user avatar
1 vote
1 answer
698 views

Robocopy mirror when source files have moved directory

so I'm using RoboCopy to mirror source and destination. It mirrors fine, so now I have matching content on Source A: and Destination B:. My question is this. If I take all files and subfolders from ...
Alex B.'s user avatar
  • 11
1 vote
2 answers
14k views

Robocopy: copying files without their directory structure

I have a network fileshare called \\SMWEB\MSDS which contains hundreds of sub-directories named MSDSnnnn (i.e., MSDS plus a number).  Inside each sub-directory MAY be numerous files — some .html, .jpg ...
gpence's user avatar
  • 131

1 2 3
4
5
11