Questions tagged [robocopy]
Robocopy (or "Robust File Copy") is a command-line directory replication command.
479
questions
-1
votes
0
answers
15
views
Back-up automatically through LAN shared
I have 11 Pc share through LAN (Back-up folder which be create by date vise) that 11pc back-up folder will be back-up in another PC through LAN.
Everyday I need to delete old folder(pervious folder) ...
0
votes
1
answer
16
views
Robocopy /purge not purging and /XD not excluding directories?
I'm trying to build Robocopy scripts to replicate my old synctoy but I seem to have something wrong with my syntax.
With the below command I want to exclude ..\local settings\Temp and ... \local ...
0
votes
0
answers
11
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 ...
0
votes
0
answers
80
views
robocopy /MIR recover deleted files from the destination
While trying to move my c:\users to d:\users (By using a Junction)
I was very careless, and used robocopy c:\users d:\users /MIR /MOVE
it moved some, but then halted on a symlinks...
so I added ...
0
votes
1
answer
76
views
RoboCopy Resume large file
I've read through the other posts I've found, but my experience seems to be different. I am definitely not a superuser and I inherited the Robocopy process we use, but in the nutshell, I map a ...
0
votes
1
answer
30
views
How to get a results ouput file from running a copy operation against a server list?
We have a batch file that we use to (robo)copy scripts to various computers on our network.
We need be able to write the result of the copy operation (success or fail) to an output file including the ...
6
votes
2
answers
402
views
RoboCopy slower than Xcopy? (Windows 10)
I'd been using xcopy in a backup script but every so often xcopy would fail with "insufficient memory" when a pathname would sneak into the backup set that exceeded 254 characters. Lots of ...
0
votes
0
answers
11
views
How rename files copied via Robocopy in all recursive directories if it exist but with different modify date [duplicate]
I found a very useful script here on the site to copy/rename modified files.
But I cannot get it work recursively on subdirectories. I have tried several things like "-Recurse" in different ...
1
vote
1
answer
112
views
Robocopy: Multiple Robocopy to one log file
I'm looking for a way to log the results of multiple Robocopy runs from one bat script to one logfile so it's possible to lookup any errors in just one logfile. Is this possible? This is my script:
@...
0
votes
0
answers
307
views
robocopy: copying data from source to dest ends up with total file size a lot bigger than the original
I have a 5TB external drive (WD My Passport, lets call it drive E:) and I want to move all the data to another identical drive (5TB WD My Passport, lets call it drive F:) because my first drive starts ...
0
votes
1
answer
36
views
USB Drive Bulk Copy Failure Windows 10 + 7
I'm trying to copy about 60 GB of files off a 64 GB USB drive onto a new 128 GB USB Drive under Win10 using robocopy. I can copy about 50GB but then the copying stops, without reporting any errors. ...
0
votes
0
answers
26
views
Why are there disk usage differences after backup/mirroring with robocopy?
I wanted to mirror the content from one disk (E:) to another disk (D:). If I compare them I see some file/folder/size differences and currently I don't know why ... Through exclusion I would expect ...
0
votes
1
answer
494
views
Robocopy: ERROR 87 (0x00000057) Time-Stamping Destination Directory
I'm using robocopy to copy files from a CD drive to a SATA drive in USB-to-SATA enclosure. This is the command that I'm using:
FOR /F "tokens=6" %%a IN ('vol e:') DO SET var=%%a
md k:\%var%
...
0
votes
1
answer
157
views
Robocopy copying from different drive
I am using robocopy to transfer files from an old laptop drive to an external drive because I believe the hard drive is close to failure. I ran the program with these arguments
robocopy D:\ E:\...
-1
votes
1
answer
348
views
Making Functional Robocopy Backup Script?
I cannot for the life of me get the thing to run on a new user laptop setup I'm working on. I'm hoping someone can help. I have been trying to search forums and YouTube videos but would really benefit ...
1
vote
0
answers
36
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 ...
0
votes
1
answer
198
views
Robocopy over SMB from Windows 11 to MacOS Catalina Locks folders and makes backup fail
I am trying to backup an external hard drive on my Windows machine to an external hard drive on my iMac running macOS Catalina. I am using Robocopy batch file to mirror the 2 drives. The code I am ...
1
vote
1
answer
389
views
Can Robocopy copy, without replacing: changed, newer or older files?
I’m trying to copy all files that are:
changed (i.e.: they have a different size in either source or target)
Newer or older (they have a newer or older timestamp, i.e.: different date modified or ...
0
votes
0
answers
268
views
How to copy files in File Explorer while preserving all Metadata attributes: Including Last Accessed Date, Modified Date, etc
I have scoured superuser for an answer, and have found similar questions, but none of them talk about preserving the Last Accessed Date. I have already wanted to archive all the last accessed dates on ...
1
vote
0
answers
222
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 &...
0
votes
1
answer
364
views
Robocopy specific files from subdirectories to a single directory
I want to copy files within many sub-directories that match specific pattern to a new directory. I don't want to copy the folder structure as I want all of the copied files to be contained within a ...
-1
votes
1
answer
976
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
0
votes
2
answers
813
views
Robocopy: Copy all files in subdirectories within parent folder to a new folder
I've done some googling and although this seems to be a pretty straightforward process I have been unable to find code that works.
I have a folder with several sub-folders and sub-folders within them ...
0
votes
0
answers
89
views
How to use Robocopy to exclude all files in certain subfolders
I have following folder structure:
Countries
Australia
-- Input
-- Output
-- Processed
-- Metadata
-- Log
Africa
-- Input
-- Output
-- Processed
-- ...
0
votes
0
answers
146
views
How to copy files from one drive to another while maintaining folder structure
I used an old program (rich copy) to copy files from one drive to another. The files have been created, as well as the directory structure, but due to some long file names and directory names some ...
1
vote
3
answers
208
views
Incremental copy of log file content
I have a couple of log-files, growing one line at a time, as log files do.
The files are available via SMB network share.
I want to periodically copy these files. Since the network is rather slow and ...
0
votes
0
answers
69
views
How to reverse the effect of robocopy junction link command used to change the directory of ProgramData from C to D?
I recently followed the following advise to free up space on my C Drive, however, I wasn't able to delete the ProgramData folder after executing the command below. Any idea how I can reverse the ...
1
vote
1
answer
800
views
How to overwrite files using robocopy regardless of their last change date
I want my PowerShell script to take a backup of $destination directory, in $backup directory, but the newly created backup directory should be named $destination-{yyyy-dd-mm} where 'yyyy-dd-mm' is ...
0
votes
0
answers
13
views
Windows: Exclude certain directories while robocopy
I want to remove the "doc" directory from the folder "C:\test\mentor_20220807hier".
J:\builds\hier_mentor have "ert", "doc", "mgh" as its content. C:\...
0
votes
1
answer
44
views
Robocopy Skipping All files Targeted
Good Afternoon,
I'm attempting to use robocopy with Powershell to recursively grab all files from sub-directories and moving them to one "root" directory. I tried doing this with copy-item ...
1
vote
1
answer
521
views
Robocopy script to copy certain file names with space inbetween
I use the script to copy certain files with file name having space in between. I tried serveral options but still in vain. Please help
robocopy "Z:\Software\Microsoft Office" %userprofile%\...
3
votes
1
answer
143
views
Robocopy from network drive doesn't skip duplicates
This is my robocopy line:
robocopy "\\network\Document\Migration" D:\Migration /S
As described here robocopy should skip files that have the same size, date and name.
First copy from ...
0
votes
1
answer
237
views
Using Robocopy to copy files based on a word in the file name
So ok, I'm looking for a solution to scan a hard drive.
And look for folders in that hard drive that have #ARCHIVE#, and move said folders to a \nas\archive\
I know you can use Robocopy to copy files ...
3
votes
1
answer
564
views
Can LastAccessTime be set to an old timestamp using PowerShell?
I am using PowerShell to create test files for testing the output of Robocopy logs. To get different combinations of newer and older files, I am setting the file timestamps in the source and ...
0
votes
0
answers
162
views
Robocopy using a NO-IP address
I think I was unluck to explain what I need on my 2 first posts. Let's try one more time...
Just need to sync a folder from a computer in a different city. But I don't know how to tell robocopy to use ...
0
votes
0
answers
620
views
Powershell New-PSDrive from remote computer
I'm here again with one more question.
As stated here, I sucessfully connected two servers to copy a lot of files. But the copy won't worked at all. It returns a lot of errors on files and folders ...
0
votes
0
answers
221
views
robocopy: excluding multiple directories not working
I'm running the command:
robocopy /E /XJD E: D: /XD 'E:\$RECYCLE.BIN\' 'E:\System Volume Information\'
Which runs for a while but then gets stuck at:
2022/05/21 21:39:04 ERROR 5 (0x00000005) Copying ...
0
votes
1
answer
194
views
Any way to remove the hidden attribute when robocopying from the root folder?
When I copy from the system root drive like this:
robocopy D: C:\users\localUser\pictures\CPics *.jpg *.jpeg *.png *.gif /e /MT:4 /R:0 /NP /SL /SJ /NFL /NDL /XA:o /B /LOG:"C:\Users\anton\...
0
votes
1
answer
207
views
Robocopy destination folder not specified
I want to make a backup copy of an entire drive to a folder in an external drive but robocopy doesn't "see" the specified destination folder.
The idea is to update all the files and add the ...
0
votes
0
answers
139
views
Network share access denied after STIG/CIS hardening in windows
I have one windows server from where I was running robocopy and it was working. The source was a network share from where I was copying some files to this windows server.
After implementing CIS/STIG ...
1
vote
2
answers
1k
views
Any way to copy only all the files in a folder, without the folders?
Any way to copy only all the files in a folder, without the folders?
I tried these to no avail (they copy folders too):
ROBOCOPY D:\SAMPLE D:\SAMPLE2 /IF *.* /E
ROBOCOPY D:\SAMPLE D:\SAMPLE2 *.* /E
...
0
votes
1
answer
145
views
Restore file modification time from backup
Due to some careless copy/zip/unzip operations, all files in a folder and its subfolders had their last-modified time updated.
I would like to restore the correct file timestamp from an older backup.
...
2
votes
2
answers
940
views
Is there Windows copy command that mimic Unix `cp -r` behavior?
I don't know how to name this behavior vividly, just call it loyalcopy.
Two figures will illustrate it clearly.
I'd like to issue two commands to copy two filesystem nodes (regardless it is a file ...
0
votes
0
answers
444
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?
0
votes
0
answers
757
views
Robocopy only copy folders modified in last 7 days. working on C drive, not on server?
I am trying to create a robocopy program which runs every Sunday and pulls in the last 7 days of folders (and its sub-folders). This is because the folder stores years worth of data so I only want to ...
0
votes
1
answer
577
views
Can Robocopy sync Files in a Directory between two pcs, Modifications of files on both pcs, but want to keep newest modifications/files synced
So I am trying to keep a Minecraft Game Save Folder that is located in both PC A and PC B in sync. PC A and PC B will both access/modify the contents of the files in this folder periodically. I would ...
0
votes
1
answer
1k
views
Robocopy error: ERROR 5 (0x00000005) Changing File Attributes
Ugh. I've been using this command for years and am now getting this error:
robocopy m:\ e:\ /MIR /MT /R:1 /W:10 /XD m:$RECYCLE.BIN m:\temp\Backup m:.TemporaryItems "m:\System Volume Information&...
0
votes
1
answer
3k
views
How can I MERGE multiple folders and Files to a new single folder?
I Have A folder named "SCENERY" on Drive F (F:\SCENERY)
SCENERY contains several folders: A,B,C... etc
I would like to MERGE the contents of A,B,C... etc to another folder on Drive F named &...
0
votes
0
answers
383
views
Should my PC go to sleep while robocopying?
I noticed my PC goes to sleep while robocopying, so I' having to set the timer to a long time in Settings > Power&Sleep > Sleep.
I checked with the powercfg -requests command it it seems to ...
0
votes
1
answer
465
views
Why does Robocopy skip a changed file if file length and file date are the same?
I've been using Robocopy for a while to create a (quick) backup of my disks. The exact command I use is robocopy /MIR /R:0 sourcedrive:\ targetdrive:\sourcedrivename .
This should create an exact ...