Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
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, ...
query-01's user avatar
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. ...
HugoRune's user avatar
  • 748
1 vote
0 answers
1k views

Robocopy Error 53 when not logged in. When logged in, Robocopy runs successfully

We run a nightly scheduled task that copies files from a local drive to a network share. When I'm remoted in to this machine using any account, Robocopy runs fine. When I'm not logged in, Robocopy ...
OSeRAcKB's user avatar
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 ...
Nathan D'Silva's user avatar
0 votes
1 answer
1k 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 ...
Elliot Strong's user avatar
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 ...
Ray Woodcock's user avatar
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\...
CreativiTimothy's user avatar
2 votes
1 answer
4k 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 ...
Datatravler'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
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
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
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
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
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
1 answer
47 views

Attempt To Use Batch Files While Keep Structure

I wanted to use robocopy, but it is not possible due to my text file has filenames attached. I ended up have to use copy instead. I wanted to copy files like this... Source: S:\folder\A\B\C\D\E\...
PanK's user avatar
  • 3
2 votes
1 answer
548 views

xcopy invalid parameters - copying all files in folder

for /R "c:\" %f in ("*.pdf") do xcopy %f "%USERPROFILE%\all\text" /s /c /d /e /h /i /r /y This is the command I am using to copy all of the .pdf files on my computer into one folder. However, it does ...
ss.benjamin's user avatar
0 votes
1 answer
5k views

How to copy Folder directory including Root volume folder on Windows?

I would like to copy Recursively the full C:\Test Folder with all subdirectories including the Test folder and the folders permisions. I tried using the following commands but it only copies the files:...
Angel's user avatar
  • 1
0 votes
1 answer
153 views

How to simply keep a file in open status without help of program in C language/etc.. by using windows bare basic features?

Why robocopy still copy an open file, opened by txt editor in windows Further to above question, how could it be the simplest way to keep an file opened in a bare windows env like server 2016 ...
Ken's user avatar
  • 43
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 ...
Ken's user avatar
  • 43
0 votes
2 answers
492 views

How to duplicate files onto an external backup drive, but first moving existing files to match the source folder tree and get a report?

If the title didn't make much sense then, let me provide more details. My problem is that there are some identical files on both drives already, but they reside in different directories. Let me show ...
computationalprince's user avatar
2 votes
2 answers
2k views

How to backup file from server and keep last n versions?

I am trying to create a batch script to backup an Access Db from a NAS Server to another server and keep the last "n" versions of that file (n is fixed inside the script), this script is going to to ...
Chico3001's user avatar
  • 274
-1 votes
1 answer
2k views

Windows batch, how to automate RoboCopy in Compare mode, not Copy mode?

This RoboCopy Compare command below is working fine, it is comparing 2 folders and outputs results to a text file and if there is a difference between 2 folders then text file has at least 5 phrases ...
Joseph's user avatar
  • 111
1 vote
1 answer
1k views

Make robocopy skip offline computers in text-file

I'm trying to write a batch file that will robocopy a msi file from a server to all the domain PCs that are online at that time. It should skip PCs that already have the file listed and PCs that are ...
Maarten's user avatar
  • 21
3 votes
2 answers
3k views

Robocopy: destination folder size is bigger than source folder size

I've backed up my windows profile folder to external hard drive with the following command in batch file: robocopy %userprofile% %~dp0src\dest /b /mir /mt /r:1 /w:5 >nul After the copy was ...
qwaz's user avatar
  • 163
0 votes
0 answers
105 views

Batch - how to read from file with path

I would like to do a robocopy of files whose path is listed in .txt (below is the file structure): Path C:\file1 C:\file2 etc. I need to do a robocopy and save the name of the file. How can I do ...
jax's user avatar
  • 11
1 vote
1 answer
2k views

Exclude all variations of file extensions with Robocopy

Robocopy seems to sometimes automatically wildcard file extensions when filtering. For example, using ".m" gets "filename.m" and not "output.mat". However, ".txt" gets "filename.txt" but also "...
Dan C's user avatar
  • 15
0 votes
0 answers
111 views

MS Sync Center vs Robocopy batch job

I have a number of videos from our marketing department on a local machine for video editing which need to be transferred periodically to a few different NAS's. Is there any appreciable difference ...
tjcinnamon's user avatar
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 ...
someone's user avatar
  • 61
0 votes
0 answers
7k views

Robocopy: ERROR 5 (0x00000005) Accessing Source Directory \\server\ParentFolder\ChildFolder\ Access is denied

I have the following robocopy command to copy the directory from a folder on the network location to another folder on the same network location: @ECHO OFF for /f %%a in ('wmic os get LocalDateTime ^|...
Yash Saraiya's user avatar
1 vote
1 answer
2k views

Write Robocopy batch output to a text file trouble

I want to write the output of a Robocopy command into a text file that I can review to see which files were copied and so forth. I tried these commands... robocopy drive:\ destination:\ /e /v>log....
user avatar
4 votes
2 answers
39k views

Robocopy: Log names of skipped/Failed files

I am using the following batch file to run my robocopy command: @ECHO OFF for /f %%a in ('wmic os get LocalDateTime ^| findstr ^[0-9]') do (set ts=%%a) robocopy [source] [target] /log+:D:\logs\log_%...
Yash Saraiya's user avatar
0 votes
3 answers
1k views

Robocopy: How to copy assets from multiple locations to a single location and maintain a log

I have multiple folders containing assets (each folder has subfolders containing these assets .mp3, .txt, .png, etc). I want to copy all this assets along with the subfolder to a single location/...
Yash Saraiya's user avatar
1 vote
1 answer
1k views

Wildcard in rename and robocopy command into batch file

What I am attempting to do is automate some work I do daily. What I would like to happen is a prompt saying What is your name? Then use that answer as a variable to be used in different commands like ...
Cam's user avatar
  • 11
1 vote
1 answer
3k views

robocopy cannot find the path specified

I wrote a small BATCH-File to sync my PC and Notebook folders for university. REM set tdate=%date: =% REM set tdate=%tdate:/=% REM REM set ttime=%time: =% REM set ttime=%ttime:.=% REM set ttime=%...
Yaerox's user avatar
  • 183
1 vote
2 answers
927 views

Copying files from somewhere within a directory tree to a folder

I have a mirror of a large website that I need to reorganize, most of the images and files I've been able to programmatically move and relink up; however, there are a few (few is a relative term, we'...
user avatar
2 votes
2 answers
15k views

Error when trying to copy over the network using robocopy

C:\Users\Alex.Newton>robocopy /"\centlpf01cz6c\c$\Program Files\ProgramName\/" /" \centlpf01cz6c\Program Files\TestBatch\Test\/" --------------------------------------------------------------------...
Alex's user avatar
  • 49
-1 votes
4 answers
2k views

How to create a USB that copies all photos from PC to which it is connected, using Batch files?

I tried doing this, but it is not working :: variables /min SET odrive=%odrive:~0,2% set backupcmd=xcopy /s /c /d /e /h /i /r /y echo off for /r C:\ %f in (*.jpg) do @copy "%drive%\all\pics" @echo ...
Piyush Thakur's user avatar
0 votes
2 answers
2k views

How to copy a file to a destination only if the source file is newer than any of the destination files?

I'm looking for a way to accomplish this task. I've tried robocopy and writing a batch file, but robocopy doesn't seem to be able to do it (since /MINAGE can't do time--only dates), and writing a ...
Force Flow's user avatar
  • 4,116
1 vote
1 answer
7k views

Run batch as ADMIN & use robocopy

I need to copy from %USERPROFILE%\Desktop to B:\Desktop where B is a mapped network drive. The code inside BAT file is: powercfg -change -standby-timeout-ac 0 robocopy "C:\USER\DESKTOP\" "B:\DESKTOP" ...
Guilherme Ramos's user avatar
-1 votes
1 answer
2k views

Batch file to copy files from server to desktop according to date

I will explain what I´m trying to get up and runing. I have a folder on the server containing several subfolders and zip archives in those folders. The string of the server is like: \\server1\groups\...
DSS8707's user avatar
2 votes
1 answer
5k views

Robocopy copy only changed files to new folder

I'd like to create a backup such as the following: C:/backups/20140101/ All files from source folder C:/backups/20140102/ Only files changed since last backup C:/backups/20140103/ Only files ...
Garth Oates's user avatar
1 vote
1 answer
1k views

robocopy using parent folder name

I have a small batch file that uses robocopy to backup a folder. The intended action is for it to copy C:/users/public/ into D:/Backups/YYYY-MM-DDTHHMM/ At present, it copies the files into a folder, ...
Garth Oates's user avatar
3 votes
2 answers
37k views

Batch file, skip a step if an error occurs

I'm trying to write a script that automates copying some files from two external locations using Robocopy. I want the script to skip a step if one of the locations is unavailable. I'm using the ...
Robert Holden's user avatar
6 votes
2 answers
4k views

How to wake a network drive from batch script?

I have a batch script which runs a robocopy. It is failing because the drive is not awake. In windows explorer, doubling clicking on that icon "wakes" up the link and the cross disappears and the ...
Valamas's user avatar
  • 1,555
1 vote
2 answers
5k views

CMD MOVE can't replace directories in WIN 7 [duplicate]

The MOVE command does not work when to ovewrite a directory. I have also tryed to run cmd with admin rights. I'm posting this question with more info so you can easily test it self. Make your own ...
Aziz's user avatar
  • 597
2 votes
0 answers
199 views

"Access denied" when trying to move a directory in Windows 7 [duplicate]

Possible Duplicate: Access denied, cmd move windows 7 I can't use this command in Windows 7 when I want to move a directory. If the destination exists, it says "Access denied". Why does this ...
Aziz's user avatar
  • 597
8 votes
5 answers
67k views

Access denied, cmd move windows 7

I can't use this command in win 7 when want to move a directory if the destination exists. It says Access denied. Why hapens this? It worked in XP. move /y "%1" c:\mydir\ I can use robocopy, but ...
Aziz's user avatar
  • 597
2 votes
1 answer
3k views

robocopy can’t find newly zipped file for copy

I am working with a batch file that is being used to copy files from several remote servers to one central repository using robocopy. I am trying to zip the contents of a folder and then copy it but ...
Wduncan's user avatar
  • 96