Questions tagged [robocopy]

ROBOCOPY.exe - "Robust File Copy" is a Windows command line file & directory replication utility published by Microsoft.

Filter by
Sorted by
Tagged with
0 votes
0 answers
9 views

xcopy always override files

this is the situation: File System is corrupt and files are damaged. ChkDsk repaired the filesystem but files are still damaged. So I want to use a Backup and overwrite all files without exception. ...
Vinc's user avatar
  • 1
0 votes
0 answers
40 views

How can I copy complex directories with PowerShell's robocopy, including exception files?

I have a problem in a complex copy. Below is an example of my script and CSV with source and destination paths. The powershell script I created works well in part but not totally, it makes the copies ...
Jean-Marc Swiss's user avatar
0 votes
0 answers
11 views

Archive files in a NAS storage

I want to archive some files in a NAS storage. I have the path, the directory contains thousands of files, i want to move them to another folder in the same NAS storage and run a scheduler to archive ...
Jyotirmaya Mohapatra's user avatar
0 votes
1 answer
38 views

Robocopy Windows 11 how to move target folder inside destination folder

I'm trying to move multiple "marked" folders in a directory inside a copy folder (that may or may not already exist). Robocopy isn't moving the targeted folder inside the destination folder ...
NightMonkada's user avatar
0 votes
0 answers
23 views

Is there a way to use Robocopy to only copy files from a specific user?

I'm using Robocopy to transfer all my modified files (over the past few months). However, when I run the command, using the /L option to see what it's doing, its picking up files from apps that I ...
Feylin Urlala's user avatar
0 votes
0 answers
59 views

Robocopy to Shared Drive of Google Drive with G: Disk in Windows 10

I need help to migrate a great amount of files from a server (identified as \\server\folder) to a Shared Drive, mapped on Windows 10 using Google Drive For Desktop (the path looks like this: G:\Shared ...
rainforest's user avatar
0 votes
0 answers
13 views

Robocopy to delete required file only after it copied all newer files

There is one aspect of Robocopy that cannot be optimized using its options: it deletes files before copying new ones. The example may be clearer if we consider moving some files already copied between ...
Francesco Marzolo's user avatar
0 votes
1 answer
199 views

Robocopy adding a date to the file name during copying

I have this code which copies from one location to another. Is there a method to add a date \ time to the file name. In the folder, there's only one csv file which the name changes once in a while. ...
Clinton Langan's user avatar
0 votes
1 answer
38 views

How to append the log to include the error number

How to Log error number from robocopy I have the below code to copy a file and log some information. I would like to add to this log the error number produced by robocopy, what ever it is. I've tried ...
Clinton Langan's user avatar
0 votes
0 answers
32 views

Robocopy to AWS Fileshare access denied errors

no matter what i do, i get accessed denied when trying to use Robocopy to move SQL backups off of a windows server to an AWS SMB Fileshare. I am running the robocopy command on the sql server. Ive ...
thenameskam's user avatar
0 votes
0 answers
17 views

Robocopy with Date & Time Appended

What is the Robocopy code I need to use to copy my Dhcp.cfg file to a directory with the date and time appended to the end like so... Dhcp_03272023_1130... given the date and time are the current date ...
Russell Profitt's user avatar
-1 votes
1 answer
31 views

copy one file into other folders

I am trying to copy one .txt file into a large amount of folders. To do this I am trying to use robocopy, but maybe there is a better way since I am only trying to copy one file (stress_strain_example....
landon.1111's user avatar
0 votes
0 answers
47 views

Invalid Parameter #3 ROBOCOPY cannot use a wildcard _*_ between underscore

Hello I'm trying to use a simple bash file to copy multiple folders as you can see below this is the bash file for /f "tokens=1,2,3 delims=" %%T in (sites.txt) do ( cd.. robocopy /E ...
Samuel Gtz's user avatar
0 votes
0 answers
38 views

Windows backup script

I want to write a script in windows to backup a number of folders from a source path to a destination. The folders to be backup are listed in folders.txt. I want to exclude some file types like *.tmp ...
Koullis's user avatar
-1 votes
1 answer
40 views

Copy all files from source directory to another spot in Command Prompt

I am trying to create a batch file that auto moves some files and creates folders for an installation. I want to copy 4 .ocx files in the installer folder to C:\Windows\syswow64, when I try running ...
Chase Mostat's user avatar
0 votes
1 answer
57 views

How to run Robocopy programmatically elevated from vb.net and preserve security settings

I am attempting to run robocopy from a vb.net application to copy many folders & files and preserve timestamps, ownership and security of files. While testing, a command such as: robocopy ...
Sam Marrocco's user avatar
0 votes
0 answers
31 views

Can I use robocopy to move files while "flattening" directories at the destination?

I have a large collection of images in "Folder A". Folder A contains MANY nested directories. Folder A also contains lots of files I don't want to move. (These files have ben de-duped.) I ...
Joseph Moore's user avatar
0 votes
0 answers
34 views

Robocopy and files starting with "." dot

I'm starting to use robocopy for my daily backups from my computer to my NAS (Openmediavault, with a Samba sharing). The target is create a mirror of my Z:\ disk into the NAS. To make it possible I ...
TheFax's user avatar
  • 1
0 votes
0 answers
90 views

Copying files from remote server to local windows machine in cmd using robocopy instead of scp: network path not found

I need to copy a large folder and its contents from a remote location to my local machine (PC, Windows 10). I usually use scp but it's not suitable in this case because the network closes after a ...
Bear Brain's user avatar
1 vote
1 answer
67 views

Move a List of Folders from csv File without losing the permissions

I am trying to move a list of user folders to a new file server so I need to keep the permissions intact. For that I am using robocopy. The problem is, it will only move the files and subfolders ...
Hidden_Name's user avatar
0 votes
0 answers
164 views

Copy a folder from D drive to a USB flash drive using robocopy

How do I copy folder T in D drive to a flash drive (H) using robocopy? When I try to copy files to my USB flash drive in the normal windows way, the copying process keeps getting paused and I have to ...
Mr_G's user avatar
  • 115
0 votes
0 answers
17 views

How to separate files like (same vs new) after using robocopy

So I am working on server files and have been successful in using Robocopy to make either copies of files or new ones in the designated directories. robocopy "\\DIRECTORY\FOLDER\FOLDER1\FOLDER2&...
Sahar's user avatar
  • 13
0 votes
0 answers
18 views

Using Robocopy to transfer what was missed in orginal transfer?

I have to transfer from an old file share to a new one. I transferred over a large portion of it about a month ago using robocopy but it seems like it did not transfer it all properly. I need to ...
Zachery Miles's user avatar
0 votes
0 answers
61 views

using robocopy to copy only files with a specific attribute

I am very new to using the command line and I am trying to write a batch file that, at one point, will robocopy only the files with a Read Only attribute from one directory to another. I see that ...
Minnie Keane's user avatar
0 votes
1 answer
66 views

How to avoid storing bloat output of CMD while logging the commands in log files?

everyone. I was using Robocopy and WinRAR in a CMD batch script. I was surprised to see the log file was huge and full of bloat. The WinRAR bloat was not that bad. However, the Robocopy output was so ...
CodingNoob's user avatar
0 votes
1 answer
113 views

Copy folder to destination with its folder structure

I have a folder foldertocopy with files in it. It is inside a folder structure like so D:\somefolder1 |--somefolder2 |--somefolder3 |--foldertocopy There ...
ontherocks's user avatar
  • 1,677
0 votes
0 answers
57 views

Robocopy Delete Directory Not Functioning

I am testing a script to delete unwanted directories with Robocopy: @echo off set maxdepth=3 set source=. robocopy %source% %source% /s /purge /lev:%maxdepth% /xd unwantedDirectory However, the ...
forestDean's user avatar
0 votes
1 answer
59 views

How to batch copy a list of folders and its file contents from a text file into a new folder in windows

I have a folder with approximately 7000 subfolders. I am interested in copying 1500 of those subfolders and their file contents into a new folder. The closest I have got is copying the subfolders file ...
MagicGnome's user avatar
0 votes
1 answer
57 views

How to delete a folder in the destination folder only if it exists in the source folder

Using Powershell, How can I delete folders in the destination folder only if they exist in the source folder? For example I have the folder structure below and want to delete Folders1 2 and 3 before I ...
HelpMePlz's user avatar
0 votes
0 answers
107 views

Version backups and restoring latest backup with robocopy

I am trying to write a batch file and use the robocopy command to backup a directory. However, I need multiple backups to be kept. Let's say I have a directory "A" in "C:\Source Path&...
MYousefi's user avatar
  • 978
0 votes
0 answers
69 views

Robocopy - copy folders based on creation date

I'm trying to use robocopy to find all folders on a mapped drive and copy them based on the "folder" creation date. If I use /maxage it only looks for "files" age and not the ...
Hammad Mansoor's user avatar
0 votes
1 answer
37 views

Move files into new folder while using another folder as the structure

Here is my situation : I have a bunch of folders containing images, some folders have sub-folders, and some don't: . └── folder0 ├── folder1 │ └── imageA.png ├── folder2 │ ├── ...
Polymood's user avatar
  • 389
0 votes
1 answer
241 views

Copy file with security using robocopy

Hi I need to copy a file with timestamp and security from other server. I copied it but the security is not same. The specific user is grant to modify the file. However the copied file missing this ...
Y Chan's user avatar
  • 317
1 vote
1 answer
35 views

Batch File Unable To Compare Two String Variables

The company I work at utilizes a batch file to backup user profiles. The script originally used robocopy, but now also uses xcopy in some cases. We run this script manually when re-imaging users to ...
MKEmike43ver's user avatar
0 votes
0 answers
128 views

Robocopy - Copy Files By Date Instead Of By Filename

By default Robocopy copies files in order by their filenames. I want to copy the files by date (or date modified) because they appear by date to the end user. (They have no sort, date is the default ...
Karen Strong's user avatar
0 votes
0 answers
83 views

Need Support with batch script to find, compress and move backup with daily schedule

I made a batch script to find and compress and move backup with daily schedule: @echo off robocopy C:\TempBackup C:\TempBackup\X *.BAK* /w:0 /r:0 /np /fft /maxage:1 /maxlad:1 7z a -tzip X "X\*&...
Ahmed Ali's user avatar
0 votes
0 answers
23 views

Robocopy vbs script with subfolders and spaces

I'm using this script to copy files and folders from one path to another one, but right now I need to create a new one to copy folder with spaces and files with spaces (this one doesn't copy this ...
Federico Latta's user avatar
0 votes
1 answer
172 views

How to copy multiple files at once to different directories using robocopy?

I have several files inside different folders and I'm trying to copy them to another different folder. For example: [source] [dest] C:\Users\...
Daniela's user avatar
  • 119
1 vote
0 answers
74 views

Why no commandline/powershell command can copy a snapshot image of a open PST file, yet File explorer copy can?

I am trying to automate some backing up of important stuff in a computer, specifically I want to automate backing up local Outlook archives (.pst). The thing is that these computer's users might be ...
rovda's user avatar
  • 221
2 votes
1 answer
132 views

Copy files from a text list and preserve folder structure

Textfile contains full path of each file, all these need to be copied while preserving folder structure C:\test2\sample2.jpg G:\test3\folder1\sample3.mov C:\test6\fol der1 \sample77.iso D:\test3\...
net's user avatar
  • 23
0 votes
1 answer
155 views

Recursive Folder/File Copy Powershell Script - Robocopy won't stop copying once done with list

I'm trying to come up with a PS script that reads folder names from a txt file and recursively finds the folders/files in a source directory and then uses robocopy to copy to a destination directory, ...
nottoobright's user avatar
0 votes
0 answers
44 views

Robocopy to User path in which username contain backspace

I can't find the way to use the Robocopy command for path which has the username & the username has backspace I want to use a Robocopy command which will work in any profile name. If my username ...
Johnn78's user avatar
0 votes
1 answer
33 views

How to pass a spaced path from robocopy output to a batch file?

I'm using the following script which outputs from robocopy all file names (with full paths) and their creation dates located in "H:\Backup" folder and if the total size of all files exceeds ...
Alex Smith's user avatar
0 votes
3 answers
66 views

copy newer files without keeping folders

I have a folder with a number of subfolders containing files and want to copy all files to the root folder but only overwrite if newer. In powershell I can do - Get-ChildItem D:\VaM\Custom\Atom\Person\...
Puck's user avatar
  • 25
0 votes
0 answers
71 views

Robocopy log errors into log file

I want to copy file "hello.txt" from source folder "abc" to destination "def" using robocopy. I am running below command - Robocopy [source] [Dest] [filename] /log+:D:\...
Neha Gill's user avatar
0 votes
0 answers
39 views

Robocopy log differentiate copy from update

I had THOUGHT that RoboCopy logs could show the action for individual files, i.e. differentiate between a file copied new because it didn't exist in the destination vs file updated because it does ...
Gordon's user avatar
  • 6,087
0 votes
1 answer
150 views

Need to declare variables based on textbox input after a button click

I am attempting to create a GUI for a script I wrote a while back. I have had a little trouble with it; I would like to have the "Submit Entries" button log the data entered by the user and ...
SammyD007's user avatar
0 votes
1 answer
108 views

Batch File to copy files to new directory while renaming, skipping existing files, and without confirmation

I am creating a batch file to be run later which will be used to copy files from one location to another while renaming the files, skipping any existing files, and without prompting the user. Examples ...
agrarian's user avatar
0 votes
1 answer
833 views

Copy/clone folder permissions to another folder (Windows)

I was stuck with copying the User and Group permissions from one folder to another. The ask was - Copy one folder's permissions to another folder without copying its contents. One solution is obvious :...
Ankan Das's user avatar
  • 268
-1 votes
1 answer
81 views

Environment variable + robocopy

I'm having trouble creating an environment variable to use with Robocopy. I would like to create one variable that detects the drive letter where CMD is open, to copy something from within a path of ...
Tyrone Hirt's user avatar

1
2 3 4 5
21