All Questions
Tagged with robocopy command-line
89
questions
0
votes
0
answers
8
views
Changing a Backup using xcopy to one using robocopy in Win 11
In a Windows 11 Pro and Office 21 Pro environment on a Lenovo 13th Gen, Intel i7-55U, 16GB, 64 bit, Notebook, are there any pitfalls in an incremental copy of Dir/files from external drive F to ...
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. ...
0
votes
0
answers
26
views
Robocopy /MOVE, directory\tree not recreated, Win-11\Home
The line below previously worked with Win-10\Home; dir\tree remained intact.
robocopy D:\ A:\Bak_Up /E /ZB /dcopy:dat /LOG:A:\Bak_Up.log /TEE
By comparison, using Win-11\Home from the below .bat, ...
0
votes
2
answers
409
views
Robocopy with Task scheduler in invisible mode for KIOSK mode or alternative
Computer Setup: Computer in KIOSK mode through Shelllauncher on Windows 10 LTSC.
Problem trying to solve: I am looking to move local files on network drive.
Solution I found which have some gaps: ...
0
votes
1
answer
87
views
RoboCopy to hidden shadow drive partition; error code reads as Invalid Parameter #26 :x\
I am currently attempting to set up a mirroring of my C:\ drive. I read online that using Robocopy was the best way to set this up. I have put together the following string of robocopy options,
...
9
votes
2
answers
2k
views
Using robocopy on windows led to infinite subfolder duplication via a stray shortcut file.... How can I avoid this?
I ran robocopy on my system (with all apps I could close, closed) and tried to rip the entirety of my C drive to a different drive.
Im not sure why but, there was a systemlink in the C drive called &...
6
votes
2
answers
6k
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
1
answer
1k
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 ...
0
votes
0
answers
372
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 ...
0
votes
1
answer
376
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
2k
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 ...
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?
0
votes
1
answer
2k
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
901
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 ...
0
votes
1
answer
103
views
Robocopy command isn't backing up, is this command valid?
I'm trying to use Robocopy to incrementally back-up my project every 15 minutes, only if there are changes. I'm using Windows Task Scheduler to start the .bat file at start-up, and because I don't ...
0
votes
1
answer
1k
views
Use robocopy to exclude directories containing a file
I'm using robocopy in a batch script to back up all of my files onto an external drive, but I want to exclude any folders that contain (directly) a file called ".nosync", so I can avoid ...
1
vote
1
answer
456
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
71
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
17k
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
2
answers
802
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 ...
20
votes
2
answers
14k
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 ...
1
vote
1
answer
986
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 ...
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
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:\...
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 ...
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"
...
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 ...
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 ...
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 ...
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 /...
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 ...
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 ...
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 ...
0
votes
0
answers
132
views
Robocopy replaces root folder (sometimes?)
Something really strange is going on, and I cannot figure out why. I am running the following command on command prompt:
robocopy D:\User\Pictures D:\Temp /MIR
The first time I run it, it does what ...
0
votes
1
answer
638
views
Invoke-command still using my PC as middle man during robocopy?
Can someone look at my code and tell me why when using invoke-command, that my PC is still being used as a middle-man?
I'm trying to get the destination computer to transfer directly and not use my ...
4
votes
3
answers
4k
views
Why robocopy still copy an open file, opened by txt editor in windows
From wikipedia, it is told that robocopy will skip copying files in open status.
However, when it is under test for robocopy behaviour, the robocopy still copy the opened file by the most simple text ...
10
votes
2
answers
33k
views
Not able to access path of mobile phone in cmd
I'm kind of new at CMD so please go easy on me. I am trying to copy files from my mobile phone via robocopy in CMD as the regular copy/paste doesn't support some of the features of robocopy I'd like ...
0
votes
0
answers
772
views
Is it possible to perform a complete backup of the Users folder with Robocopy?
This is a more specific version of a broader question I posted a few weeks ago,
I have my Users folder - B:\Users - on a separate drive to my Windows 7 system. I want to copy the contents of this ...
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 ...
3
votes
1
answer
9k
views
Robocopy is ignoring /xd directories
I am trying to use Robocopy to create client software builds by copying all the necessary files out of our main repository. We have multiple clients each needing their own custom software builds.
I ...
1
vote
2
answers
24k
views
Robocopy syntax to copy single file in the same directory with new name?
I need to make a copy of a file:
with all the security (ACL) permissions - that's why I chose robocopy
the copy must be in the same directory with new name obviously
The Robocopy syntax is ...
3
votes
3
answers
16k
views
How to copy one directory to another with window command prompt?
I read alot of guides about to copy directories. On SO also read the posts
Commmand line command to copy entire directory (including directory folder) to another directory
copying all contents of ...
27
votes
4
answers
159k
views
Robocopy - Copy directory into another directory
I can't believe that I am having trouble in copying a directory into another directory via the windows command line.
What I want to do is simple -:
Lets say I have a directory -:
C:\test
and I ...
15
votes
1
answer
16k
views
Syncing between C drive and phone with robocopy
I'm on Windows 10 and trying to sync my music folder with the one on my LG G5. My plan is to use robocopy /mir, but I don't know how to write out a path to the directory on my phone. The phone's set ...
0
votes
0
answers
789
views
Robocopy (win) | Ensuring Integrity | Source/Destination "size" NOT identical (whole drives)
LAST-UPDATED: 20161204@144548
STATEMENT: "After quite some time of the first initial post, a suggestion was made to use Bash-cp. So, that means the method of using the 1-line command robocopy would ...
3
votes
3
answers
7k
views
How to copy files while maintaining original folder structure?
I wonder if I could help to do the following:
Search the PC (all units) all autocad files (* .DWG) and word (* .doc) and copy them to a new route from my server; the first time it is run must be a ...
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 ...
2
votes
1
answer
6k
views
Deleting all files from source directory after robocopy, but retaining those that cause errors
I plan to use robocopy to move files and folders from a directory on a server to a directory on a hard drive, using the following command,
robocopy [source] [destination] /e /move /xo
In the event of ...
2
votes
2
answers
8k
views
how to use space within pathname for Window's Robocopy
When my path for robocopy has a space, I surround it with " but get the weird error below...
My .bat file contains:
rem Backup scans
ROBOCOPY "C:\Users\doug\Documents\My Scans\" "B:\BACKUP\My Scans\...
0
votes
0
answers
1k
views
Robocopy transferring more data than available on source
first question on StackExchange, so apologies if there are etiquette breaches!
I am using Robocopy to mirror a complete disk drive to an external drive for backup/archive purposes. I used the ...