Tech Problem Aggregator

# Robocopy and same directory

Q: Robocopy and same directory

Hi

With the Robocopy command of Windows 8.x, how do I do a copy of a file (renaming it) in the same directory of the source file?

Thanks

Bye

A: Robocopy and same directory

You can't. Use copy or xcopy if you want to rename.
e.g.
Code:
xcopy c:\test\old.txt c:\test\new.txt

Note xcopy will always prompt you with "Does c:\test\new.txt specify a file name or a directory name on the target" so you would probably be better off with
Code:
copy /v c:\test\old.txt c:\test\new.txt

where the /v verifies the copy.

1 more replies

I have used ROBOCOPY to tranfer a large file from or to a USB drive and the destination Directory on both occassions has beeen chnaged to a hidden system directoiry, which could not be seen in Windows explorer or through command line access, even with the
"Show hidden and System files" set on in the view properties window.
The command executed was ROBOCOPY {source drive} {destination drive\folder} /MIR
The command echoed all the actions performed during the copy and displayed a successful copy command summary at the end.
To enable windows to see the directory I had  to either type the directory in the explorer address bar, or use the command prompt to change the attribute of the directory as follows "attrib -h -s d:\Films", whereupon the directory was visible in windows
explorer.
Can anyone suggest a way out if this wwithout the need to execute the attribb -h -s command after every ROBOCOPY command?

A:ROBOCOPY hides destination Directory

Hi,

Thanks for posting in Microsoft TechNet forums.

I just performed a test using above command without any problem. I am assuming it is due to the USB drive itself, it may be infected by viruses or malware. Regarding
this, I would like to provide the following suggestions:

1.
Use ROBOCOPY to copy files to the built-in hard drive to see if the issue occurs.
2.
Manually copy the files to the external USB drive to see if they are hidden.

3.
Update the security software and perform a full scan.

4.
Format the USB drive to remove suspicious files completely and perform ROBOCOPY again.

Best Regards
Dale Qiao
TechNet Subscriber Support
[email protected] remember to click ?Mark as Answer? on the post that helps you, and to click ?Unmark as Answer? if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ?

25 more replies

I want copy a list of folders (a few hundred) to a new location. I tried using robocopy but can only get it to either copy the selected folder or all folders with subfolders. What I want is to only copy one level of folders and not the subfolders within.
Example:
C: Drive (the source) ->Clients->Client 1
->Order1 ->More SubFolders
->Order2
->Order3
->Order4
->Client 2 ->Order1
->Order2
->Order3
->Order4
->Client 3
->Client 4
So I would want to copy over just the first level of folders (the list of clients), but none of the subfolders within each client folder.

any help would be great.
thanks.

A:Robocopy? Copy Directory Structure 1 level

Hi,

Try using the /LEV:n switch in your robocopy command.

From robocopy /? at command prompt

Code:
::
:: Copy options :
::
/S :: copy Subdirectories, but not empty ones.
/E :: copy subdirectories, including Empty ones.
/LEV:n :: only copy the top n LEVels of the source directory tree.
It should look similar to this:

Code:
robocopy C:\Clients G:\Backup\Clients /LEV:2
Perform some tests to make sure it works OK.

Regards,
Golden

3 more replies

I have a Robocopy batch file that works wonderfully when copying from Windows to a USB, NAS or server share.  I recently tried to use my Microsoft OneDrive as the target but could not get it working.  I mapped a drive using the WebDav address.
This works fine and using Windows Explorer I can create folders, etc.  When I try to use Robocopy to copy files from my Win7 PC to my OneDrive mapped drive I get Error 2.  After some testing I am finding that Robocopy will work if the folders
are already in place but if it needs to create a folder it will error.  So it seems as though Robocopy is unable to create the folders it needs to when using a WebDav mapped drive.  Why would this be?  I can create folders in the mapped drive
using command line such as "V:\md testfolder".

More replies

Hi all,
I was running robocopy for 1 TB of DATA. There was no failure or mismatch of file/directories. But what I can see, it copied 57000 directories and also skipped 57000 directories.
Is it because of I have used /MT switch ?
Regards,
Suhag.

More replies

I'd like to use Robocopy (I'm using Xcopy now) to copy everything from the 'current' folder. It appears that Robocopy absolutely has to have a path of some sort to correctly work. In Xcopy, we were able to runXcopy *.* C:\somedirectory\If I try the same in Robocopy I get a an error"No Destination Directory Specified"Orange County District Attorney

A:Robocopy - Wildcard to copy everything from current source directory

Hi Sandy,

It's true ROBOCOPY doesn't handle wild cards, but what you're after is still possible:

Say I want this:

C:\temp> robocopy *.* c:\temp2\

I'll get the error you get - "No Destination Directory Specified"

BUT, if you try this:

C:\temp>  robocopy c:\temp\ c:\temp2\

ROBOCOPY will work and do what your after. Quotation marks can also be used in the above path references.

I suppose one of the reasons for the lack of wildcard support is the fact that ROBOCOPY actually works to exclude files types later with the /XF switch (such as "/XF *.mp3"). More here.

Hope this helps,

10 more replies

Hi All,

I have one folder A and have another folder B in the same drive E: I need to move all the content from folder A which are more than 2 years old to folder B. Hence when I ran the robocopy it just copied and I lost all disk space in drive E.

My question is even though I used /MOV command why it is not copied and deleted from the source?

robocopy E:/A E:/B /e /MOV /MINAGE:730

A:Robocopy /MOV command copying but not deleting from source directory

I created folders Test and Test2 on drive E:, copied some files over and under two years old and tested with command

Code:
robocopy E:\Test E:\Test2 /e /mov /minage:730
Works perfect. All files older than 730 are moved, copied to destination and deleted from source. I can only think of two possible causes for your issue:System considers files to be newer than 730 days old
A syntax error in your command
Please run the command, take screenshot of the last part of summary (under the dotted line, highlighted in screenshot below) and post it here.
Kari

9 more replies

Hello folks,

I know similar questions have been asked but I "might" have a unique one. What I have been trying to do is to copy the "C:\Users", "C:\Program Files", & "C:\Program Files (x86)" to another clean hard drive "D:\".

I'm doing this to make more room for the OS in the C: drive while date will be in the D: drive. Now I have successfully robocopy Program Files & Program Files (x86). I also have copied most of the Users directory but for this stubborn Real\update directory. This is I think the real player program. I get this Access Denied and "Error 5" error. I am in elevated command prompt. I achieved this via the Repair your computer prompt on the Windows install DVD.

I also have rmdir for Program Files & Program Files and have made a mklink for both of them so windows knows where they will be. But I have not did a full boot because I don't think windows will access my Users directory because they have been moved over to the new drive. What I can only do will have to be via the command prompt.

I can't make a mklink for Users because I get an error saying something about duplicate areas? What I was trying to do is go to this Real\update directory but even trying to access that directory via cd commands will not work, giving me a access denied. Again I am in elevated command prompt "Administrator:X:\windows\system32\cmd.exe How can I get to that directory. I just want... Read more

You probably just can't move your program files due to the possibility of config files and registry entries that are looking for your programs on the c drive since that's where they where installed. They should be reinstalled if you want to move them. Also if you move the profiles folder (under c:\user) it will break your profiles and you will need to change the location in the registry. I suggest that you put everything back and just move your personal files, music, pics, & videos on another drive. That should free up a lot of space.

7 more replies

What is the format for ROBOCOPY to copy a file from the source directory and rename that file in the target directory? ie, file c:\A\a.txt should be copied as C:\B\b.txt

Thanks,
Dan

More replies

I installed ATA in my environment yesterday and the server alerted me to my AADSync server.  I allowed the activity, but I'm wondering if it is best practice to install the (Lightweight) Gateway on the AADSync server?
AADSync server is running Windows 2008 R2 without any roles installed.  Microsoft Azure AD Connect is the only service running on this server.

More replies

Hi everyone,
I'm new here and have a question. I recently had to set my system back to factory settings. Now when I go to a new web site using Firefox I get the following error message...

I'm using Windows Vista Ultimate version, 32-bit with both Service pack 1 and 2 installed. I have no idea of how to correct this problem and I know everyone on this forum are brilliant! So any help would really be appreciated.
Thanks!

Hi osprey1111,

Have you enabled: http://www.activatejavascript.org/en/instructions/firefox

Regards........................

11 more replies

I have a 10 files that have all been categorised into about 40 folders. These files have been damaged.
I have a backup of all these files, but they are not categorised and sit in a single directory.

Does anyone know of an easy technique to batch replace the damaged files with the originals?

Cannot find any apps to do such a task.

A:Replace files in multiple directory, from a single directory

Easy one:

Built in command part of Windows. Open an elevated Command Prompt and type:

Code:
replace /?
Here is how:

Folder with Backup files:

C:\Data\Backups

Folders with corrupt files:

E:\Finance\Statements\2001
E:\Finance\Statements\2002
E:\Finance\Statements\2003
E:\Finance\Statements\2004
E:\Finance\Statements\2005
E:\Finance\Statements\2006
E:\Finance\Statements\2007

Code:
Replace c:\data\backup\*.* e:\finance\statements /s

2 more replies

I need some help in figuring out how to copy a whole bunch of files from a directory tree to a single directory. I looked at all the xcopy switches, but none of them look like they will do what I want it to do. If I use the /S switch, it will keep the directory structure. Any ideas?

A:Help with copying files from a directory tree to a single directory

Do you have XP up & started? Why not just go into explorer, highlight all you need (CTRL + A to highlight everything), copy & paste?

4 more replies

Hi there.. is there someone that could help me out? I've searched and searched but have not found a satisfying error free answer yet..: (well, 2 questions actually...)
1.
I want to move the entire User Folder in my Vista OS in a different alltogether hard drive.
This would also apply to os folders such as AppData, and default location of file allocation, ie Microsoft or Adobe.
I am aware that you can move specific user folders but not the entire tree... Any help with that?

2.
I want to move the default target installation directory for any new application... I mean you can do it the manual way but some of the programs may not allow this, or even addons...

Any help greatly appreciated...
M.

A:Moving the User directory & default installation directory

I'm not answering this with any great confidence that you are not going to get into trouble here, but the default locations for the "current user" -- what you are talking about in item 1 -- are covered in this registry location:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders

http://www.kellys-korner-xp.com/xp_shell_folders.htm

I could be wrong, but I don't think there is a way to get setup programs to automatically offer that.

2 more replies

So i have 3 files i cannot delete after uninstalling a game. I also cannot rename the folder they are in without windows explorer not responding and i have to restart explorer.

I did take ownership method but that froze up to. I went into safe mode, and tried it that way - also didn't delete, it equally froze up.

I have attached an image of the delete attempt - it just gets stuck like that.

I'm out of options - please advise on what i should do ?

A:Files won't delete in directory - can't rename the directory either

What is drive F? Is it a flash drive?

8 more replies

I'm trying to delete a subfolder from my server via FTP, when I receive the error message:

550: cannot remove directory, directory not empty.

Any suggestions on how to delete?

Tks

A:~FTP error - 550: cannot remove directory, directory not empty.

The server seems to be saying you do not have permission to delete a subfolder that still has something in it. Have you made sure that the subfolder you are trying to delete is completely empty, including any hidden files? Some FTP client programs have a user selectable option to delete non-empty subfolders.

1 more replies

Hi, I have 2 questions which I desperately need help with. Here's the question: 1. robocopy shoud Run in a separate terminal window and recheck file system changes every minute. 2. write a continous logfile that contains all detected file system changes including full pathnames of affected files. How do I do this?

This is one way, put this in a batch file:

:Start
robocopy command here
timeout 120 > nul
goto Start

Lots and lots of robocopy parameters, one of which is /log:file (file being the file you want info logged ion). > nul hides the Timeout in n seconds message.

5 more replies

I have Windows Vista Home Premium and somebody recently mentioned to me about Robocopy to use from cmd. Unfortunately I got into a mess and cmd froze so that I had to force shut down.

Can somebody kindly let me know how to use robocopy to copy files and directories my document on C: drive into external hard drive J: in a simple language as possible.

Thank you very mcuh.

A:Robocopy

Welcome
This is how robocopy is used:
How to Copy Vista to Another Hard Drive | eHow.com

That being said, I would like to mention that in several years of helping out at the Vista Forum, this is the first question about robocopy. Most members use Macrium Reflect to make monthly backups. These backups are always available in the event of a catastrophe with the OS. It can also be used to transfer to another drive.

10 more replies

Need to back up data-drive regularly on drive F and send to data-drive G

Robocopy has been mentioned as win7 built-in. I'm confused what is it & how to use it?

A:Robocopy how?

ROBOCOPY - Create Backup Script

2 more replies

I have been forced by the man to switch to vista. I had a simple xcopy to duplicate a folder structor. Would someone be kind enough to translate this into robocopy for me?

xcopy r:\_DND\*.* r:\SMcbrid2\ /E /O

Thanks for the help

A:Robocopy

Here you go:

Code:
ROBOCOPY r:\_DND\ r:\SMcbrid2\ *.* /E /COPYALL

1 more replies

Hi there,

I want to use ROBOCOPY to move any file that is older than 30 days.
I've tried this command but it seems to move the file anyway, even though the file is only 4 days old:

robocopy * C:\b2d C:\archive /mov /minage: 01-04-2011

From "/minage: 01-04-2011" i thought it would only move files that are at least 30 days or more old. But this seems to move everything.

Can anybody explain why this is happening? Is it because i used a wildcard on files, will that not look at the file age?

Thanks!

More replies

how do I access a command line to be able to use robocopy? when I use the regular command prompt, I get an error message that says Robocopy is not recognized as an internal or external command, operable program or batch file. What am I doing wrong?

A:Robocopy

Where did you get the program? Sounds like it's corrupted.

2 more replies

Does Robocopy /MIR copy all files or just the ones that are added and those that are changed? I don't want to start this if it is going to take hours and hours. thanks...

A:Robocopy /MIR

Just the changes.

7 more replies

I have created a robocopy.bat as below :

robocopy C:\Users\Faust_000\Documents\Alfredo "F:\Backups Documents" /e /mir /z /np /tee /log:Alfredo_log.txt

and I have created a Planned Activity into the Planning Utility to run at certain time every day.

Now my question is :
1. if manually activeted by double click robocopy.bat it perfectly works and the log.tx file is created
2. if I execute the robocopy by the Planned Activity (by manually Excute or automatically at the planned time) the robocopy is done correctly but the log.txt file is not created or updated.

I did both on W7 Professional 64bit and on W8.1 64bit but no difference.
Could someone help me to understand why the difference of results manually and via Planned Activity ?
Blau0179

A:Robocopy

I don't use Robocopy or Planned Activity but it might perhaps be related to the current directory when the bat file is executed. If so, the other log file should be somewhere on your system and you could search for it.

I mean when you manually run the bat file you get a certain "current directory", but in the other scenario you get another directory. You can try to include a path for the log parameter or move to a certain directory with the cd command in the bat file, before the robocopy command.

2 more replies

Hello all,

To save my life I could not get the Robocopy GUI to work. I have no problem using it with command line by dropping in to CMD.

Tried the GUI it reported that the job is finished as soon as I click "RUN" but nothing copied.

Thank you kindly,
Nid

A:I need some help with Robocopy GUI please.

Why not just put the command line commands in a bat file and run them like that? It's how I do my backups.

2 more replies

Basically I would like to copy from my Skydrive to copy to my NAS once a day everyday. I know some of the basics but need help with specifics like copy to folder and making sure the newest file exists as the saved copy.

Here we go!

Robocopy C:\Users\Clive\SkyDrive\Documents B:\ /

If your looking for a clean way to do that, you should look at Microsoft Richcopy which is a GUI'd + version of Robocopy. I've used it for years and it works fine under Windows-8.

Online Guide & extra info: RichCopy Guide - ETCwiki

Hope it helps.

3 more replies

We are looking to migrate a SQL database to a new server. The database is for an imaging software and has pointers to the images. We are going to move the database in the next week or two. I wanted to start copying the image files to the new server to prepare for the migration (about 300 gig of 17k files). I understand that robocopy is a good program to accomplish this. I am looking to copy all the files, folders, and subfolders over, then copy only the changes over nightly. What is the correct command line that I should use to accomplish this? Can I save it to a bat file and use windows task scheduler to have it run nightly?

Thanks in advance for all of the help!

A:robocopy

Are you migrating to a server that will be running the same software? Why not use an SSIS package? That way, you can migrate the complete database to the new server and just point your programs as necessary.

3 more replies

I am trying to create an "End-User" Friend Company Directory site that links to field in Active Directory.

Active Directory is currently hosted on Server 2003 with latest Service packs.

I have seen several pieces of software such as People Updater/Finder most of which do more than I want to do.

Any suggestions on a CHEAP or even FREE solution?

Thanks.

-- BS

A:Active Directory to Company Directory

How often will you update this?

If its a one time deal, excel, Dsquery/ dsget and a little vbs/ JS can get you done... querying the LDAP is not too hard to put into a txt file or xls. Cleaning it up can be depending on how much you want to put into the development.

1 more replies

Following the directions outlined in Change Directory in Command Prompt including enabling command extensions outlined in Command Line does not permit the CD command to change the directory focus to a directory with a space in its name. I am trying to set the active directory prompt to C:\Users\Owner\My Documents. I can get to C:\Users\Owner but with command extensions enabled in administrator mode (CMD E:ON) the CD command will not accept My Documents as a valid directory name within Owner. The error I get is "The system cannot find the path specified." My goal is to get a directory tree (as a file) of the directories and files in My Documents with the DIR command when in that directory. The complete DOS line for that command would read C:\Users\Owner\My Documents>DIR /o:n /s > DirTreeList.txt. Any help would be greatly appreciated.

A:Cannot change directory (CD) to a directory with space in the name

Welcome to Seven Forums utnatw7f387. I'm far from an expert, but will throw out something simple until the smart people see this. have you tried

C:\Users\Owner\My\ Documents>DIR /o:n /s > DirTreeList.txt

A Guy

9 more replies

We have a mixed-mode domain (Windows Server 2003 is our primary domain controller/Exchange server where Active Directory administration is executed). We have users' home directories mapping using built-in AD functionality to map a home directory (not via a login script). We set it up by going to Active Directory Users and Computers | User Name | Properties | Profile | Home folder. We have drive H: set up to connect to \\fileserver\users\username, which is each user's home folder.

Regularly, for users of Windows XP only, we see this folder being mapped to \\fileserver\users during some Windows sessions, which non-network administrators cannot access. As a result, they see "Access Denied" when trying to go into their H: drives. This poses a problem for saving and accessing files but also because we have WordPerfect's backup folder set to the user's H: drive, and when WordPerfect can't find it, it tells the user their backup folder can't exist, which makes people wonder why they are getting an error message and what to do.

When this happens, I can go into ADUC and check the user's profile and see that their home folder is supposedly still pointed at the right place. However, when actually mapping, it mismaps to the parent directory. I would say this happens once every two weeks for me, or perhaps more often for some users. I wrote a little batch file to unmap drive H: and remap it properly that ea... Read more

A:Xp - Home Directories Not Mapping Properly - Mapping To Parent Directory (domain's Users Directory)

Try mapping the network drive on the user's computer via the command prompt, and then setting the /persistent flag to yes.

For example:

Log in as the end user on their Windows XP workstation. Open My Computer and disconnect the H:\ drive so that it goes offline and disappears from the My Computer window.
Open up the Command Prompt.
Map the network drive via the command prompt using the following commands:

Then press [Enter] and wait for the command prompt to confirm success. Next set the /persistent switch for the mapped network drives.

net use /persistent:yes

Then press [Enter] and wait for the command prompt to confirm success. Open My Computer and confirm that the mapped home drive reference has been created. Restart the computer and check it again. If it switches out, there may be a script that is running at login or some other setting that is being pushed out via Group Policy that is interfering with the network drive mappings.

2 more replies

Having trouble with quotes and folder names with spaces.
Cannot get it to run w/o an error.

SET _source=\\fs1\data\shared\"Carolyn Kris Nancy"
SET _dest=\\fsarchive\archiveshare\"Carolyn Kris Nancy"
SET _what=/COPYATOU /E /MOVE /MINAGE:1095

ROBOCOPY %_source% %_dest% %_what% %_options%

E:\Batch Move>robobatcharchive
-------------------------------------------------------------------------------
ROBOCOPY :: Robust File Copy for Windows :: Version XP010
-------------------------------------------------------------------------------
Started : Wed Apr 25 10:35:14 2012
Source - \\fs1\data\shared"Carolyn\
Dest - E:\Batch Move\Kris\
Files :
Options : /COPYAT /R:1000000 /W:30
------------------------------------------------------------------------------
ERROR : Invalid Parameter #3 : "Nancy \\fsarchive\archiveshare"Carolyn Kris Nanc
y"
Simple Usage :: ROBOCOPY source destination /MIR
source :: Source Directory (drive:\path or \\server\share\path).
destination :: Destination Dir (drive:\path or \\server\share\path).
/MIR :: Mirror a complete directory tree.
For more usage information run ROBOCOPY /? or read Robocopy.Doc.
NOTE: Read "True Replication" in Robocopy.Doc prior to first use of /MIR !
**** /MIR can DELETE files as well as copy them !
E:\Batch Move>robobatcharchive

A:Solved: RoboCopy

You need to put the quotes around the entire path:
"\\fs1\data\shared\Carolyn Kris Nancy"

3 more replies

Good Afternoon,

I am trying to do work for a client of mine, and I am having problems with the robocopy command that i am using.

Here is the command
robocopy.exe \\USER2\Photos \\SERVER1\photos /e /m /R:10 /W:2 /XF CLIENTroboPhotos.bat robophotos.log /xd c:\photos\photos-add /V /log:\\USER2\Photos\robophotos.log

Copys from Users 2 photos folder and copies it to the server photos directory

then i put a command to do /xd c:\photos\photos-add which is suppose to exclude it, which it doesn't.

It just keeps replicating each other in each folder.... Catch my drift?
Please someone who is good with Robocopy, take a look at the script and see if you see a flaw in it.

Thank you!

I just cleared 15-16 extra space on the server, and now i am back to where i use to be 256 megs free.....
**I WISH CLIENTS BREAK INTO THE WALLET AND BUY A NEW SERVER!

A:Robocopy Issue

anybody? have an aswer for this?

3 more replies

I've never had a backup routine but am about to begin. Was going to implement RAID 1 but after some forum education am finding out a removable backup disk is what I really want. So, should I assume Robocopy (likely with GUI) is still the way to go for my simple /E /Purge needs? I will be mirroring both a small system drive and a 2Tb data drive.

Cheers!

A:Robocopy still the best option?

Use Macrium Reflect Backup and Hard Disk Imaging for Windows 7, Vista, XP and Server 2003/2008

9 more replies

Evening all,

Just curious to know if anyone uses the built in utility to backup software on your machine, im trying to backup my itunes folder to an external HD but having a few issues to get this to work properly! I also use sync toy for backing up but just really want to know what everyone else uses?

As for image backups you cant beat Macrium Reflect imo

A:Anyone use robocopy to backup?

I don't use it myself, but have you tried the Robocopy GUI? On the same site there is a write-up of the RichCopy tool.

I haven't tested RichCopy on Win7 but I have tested the Robocopy Gui and it works fine.

EDIT: I just downloaded and installed RichCopy and it appears to be working fine in Win7.

2 more replies

Hello everyone been lurking around for awhile, so much knowledge on this forum.

I hope someone can help me, I am just a noob, don't know to much.

I ecently purchased a synology Network Attached Storage (NAS).

and I would like to set up so that files tranfer from one folder to the next automatically, I am not sure what type of line to put into the command prompt?

The original folder is C:\user\recordedtv the other one is on my network and shows up as DISKSTORAGE i have a folder on there called beyondtv and would like to copy all files from C:\user\recordedtv.
How would I do this?

A:Robocopy Synology

Welcome to Seven Forums,

You may definitely setup to sync and backup files automatically to your NAS. Pls check out SyncToy, its a Free cool utility from Microsoft and its easy to setup. Sync files with your NAS ? Cogito, ergo sum

7 more replies

Hi
I've just recently realized that copying folders to a backup hard drive resets their "created" date. Should my computer ever crash, all my backup files will state to have just been created on that certain date.

Me, being the organize-freak I am, have been looking for a solution so my backed up files can have the same time stamps as on my computer right now.

I've done a little searching, and have found that people always recommend Robocopy. Problem is, I can't understand a word of the tutorials. Is there anyone with a layman's explanation for how to run Robocopy to carry out what I want?

And also just for the heck of it, is Robocopy the only solution? Is there some sort of back up program on Windows 7 that can do that?

Thanks!

A:Timestamp/Robocopy help

Some of the other posters have had similar problems, book1245, so here are a couple of references to other posts that might offer a little bit of guidance:

There’s some help for you in this thread: "Date Modified" changes when copying... Take a look at the post from Bill2 which has, among other things, this site: How to copy or move files and folders whilst maintaining their original time date stamp. | TechHead.co.uk, (and offers advice about your Robocopy problem as well), and the post from Casca which offers this advice: In a command window, run [xcopy] with the following switches: /s/e/c/a/k/h.

See also the post from huge in this thread: "easy transfer" resets folder modified date who apparently found a way to fix his problem, with only a mild amount of pain.

3 more replies

Hi all, quick question.

I have used Robocopy to back up all my photos etc. for yonks, set it so that it mirrored by files on my main laptop. I have since had the need for faster and bigger storage and so have invested in a NAS. Awesome.....BUT...

when I run my script it no longer detects that a copy of the file already exists - it thinks every file is 'newer' and so it copies everything again (not funny given it's 50Gigs!)

My script consists of several lines like this...it's very simple(!)..

robocopy "c:\Users\Steve\my pictures" "\\LS-XHLA97\backup\sr-backup\pictures" /mir /xd *.lrdata

robocopy "c:\Users\Steve\Modo" "\\LS-XHLA97\backup\sr-backup\Modo" /mir

Any ideas? Or suggestions for another way of doing this type of backup?

Many thanks
Steve

A:Robocopy and NAS problems...

8 more replies

I'm trying to use Robocopy to copy from My Documents to a network path similar to the following: \\it\shared documents\my folder. When I try to use Robocopy, I receive the following in the log file.

D:\Documents and Settings\<my user>\My Documents\TMI\
2008/09/29 13:05:45 ERROR 31 (0x0000001F) Changing File Attributes D:\Documents and Settings\<my user>\My Documents\TMI\
A device attached to the system is not functioning.

Googling this error code hasn't gotten me very far. Any ideas?

More replies

We are migrating our file server from Novell to Windows and I will be using Robocopy to do the copy. i know I cannot move the Novell rights so I have setup the folders (blank) on the destination ahead of time with the rights I want. I was going to just use the MIR switch to keep things in sync but read that MIR could overwrite the rights on the destinantion, is this true? I am not trying to do anything with rights and don't want any rights being assigned or changed.
Am I better off using /E /Purge or /MIR.....or would I be better off with a different program like RichCopy.
Scott

More replies

I've been using Robocopy for a while now and I have found it to be a simple and mostly efficient tool to mirror contents from one drive to another, and I've created a couple of batch files to simplify typing in parameters, like "AF ? ?" to copy my data files from one drive to another.

The thing is, for the last two days my data contents have been mirrored to my HDD partitions and a USB device absolutely fine - only a few files have been modified each time and I can rest assured that the contents are identical. The whole process has only taken a few moments.

But last night, the clocks went back and then earlier today I ran Robocopy once again to mirror my data contents. The HDD copy went without a hitch, but when running it to mirror contents to the USB device it started to recopy EVERYTHING over to it, naming all the files "Older"! What's more, I check the "modified" date/times on both sides and they're identical! I can only assume that the change in the clock from yesterday is the cause, and something unique to FAT32 file format (which the USB is).

The least I want to do is not to copy files with an older timestamp on top of new ones (if that's what's happening) so is there a way I can still use /MIR and use the /XO (exclude older) switch as well?

A:Robocopy help required

Well, I'm trying the /XO switch, and it seems to have worked so far.

1 more replies

I am copying files with dates in the filename (filename_20091127.txt) from one location to another. How can I drop the date from the filename when moving/having moved the files accross? The file types and filenames vary from file to file but the date format will always be '_YYYYMMDD'. Is this something that can be done with RoboCopy and if so, how? If not, with what and how? Thanks in advance.

A:RoboCopy Query

Robocopy doesn't rename files.

Welcome to TSG!

For this, I'd use RenameMaster, and just remove the last 9 characters of the file name.

It's on the Scripting tab, about 8th item down, Remove Beginning/Ending

If this is a daily occurrence, you could write a batch file to remove the date after all the files are copied. Not too hard to just remove the last 9 characteers in a name.
If you need to check for resulting duplicates or confirm it's actually an underscore followed by a date it would get more complex.
Code:
Setlocal EnableDelayedExpansion
Set _Folder=C:\Location of Files
PushD %_Folder%
For /F "Tokens=* Delims=" %%I In ('Dir /B "%_Folder%\*.*"') Do (
Set _Fname=%%~nI
Rename "%%I" "!_Fname:~0,-9!%%~xI"
)
PopD

1 more replies

Robocopy is a nice tool for backup scripts but for casual use there are a large number of Gui interfaces and Shell Extensions to make using it easier but i am trying to find the one that is the most intuitive and i was wondering if anyone has a list or knows of a place where i can compare the various utilities out there.

More replies

Hi All,

Quick question regarding robocopy. I am not that great in using it but I did manage to figure out that how to do basic copying and mirroring. My main issue is copying over files that have security permissions.

At this point, I have this:
Code:
robocopy c:\foldername e:\foldername /copyall /mir
What would I add and does it matter where I place the syntax for it to work?

Help appreciated.

EDIT: Figured out the security part. How would I get the script to still copy everything in the folder if its being used by someone else or they forgot to close it?

Thanks.

A:Robocopy script

Robocopy cannot do it by itself.
http://ithelp.cveg.uark.edu/IT_Help/Documents_files/backup.pdf

3 more replies

HI,

I'm trying to add a switch /MAXLAD:n Excludes files with a Last Access Date older than n days or specified date. If n is less than 1900, then n is expressed in days. Otherwise, n is a date expressed as YYYYMMDD.

I only want files that has been modified starting from Sept. 01, 2008 to current.

Am I inputting this correctly? Help

A:Anyone familiar with Robocopy?

DUH, I figured it out, I took removed the "/" from the date portion.

1 more replies

G'day,

Problem description: after my Vista laptop crashed (hung up in windows start-up loop) I used

robocopy c:\ d:\complete /mir ..... from the restore cmd prompt to make a backup of ca. 50gb to external hdd.

I then installed Windows 7 on the machine and used

robocopy d:\complete c:\complete /mir ... so I would be able to pull whatever folder I need to the new system.

The problem is the in both version I can see robocopy in the cmd shell copying the files in their respective folder hierarchy (which takes ages!). But on both, C: and D:\complete, I only see a folder "4d0a0xxxxx00e8e4c7332a3a394c". Right-click on the folder gives a size of approx. 6mb only, although my c: hdd space was reduced by ca. 50gb???? So, I assume the restore did work, and this is a permission problem.

I tried to take ownership of the folder under the new system to no avail. (just to clarify: i use the same username and pwd under win7 as under vista, and lost pwd is not an issue, in case i would need it to gain access)

All input highly appreciated! Thanks,
Rick

More replies

I have a quick question, is the Robocopy.exe in Windows 8.1 compatible with Windows XP or do I have to use the one in the Resource Kit?

I could download the kit, but I don't want to download the entire resource kit on each client that uses our software, as our software that utilizes it only requires the robocopy.

2 more replies

I have been using xcopy to copy data from a file server to a flash drive. That works OK, but after some time the flash drive is cluttered with files and folders that have been moved or deleted from the file server.

I want the flash drive to mirror what is on the file server, so I decided to give ROBOCOPY a try (version XP010 on a Windows XP computer). Here is the line in my batch file:

ROBOCOPY \\fileserver\share\frank\somefolder E:\somefolder /COPYALL /B /MIR /R:0 /W:0 /LOG:MyLogfile.txt

This works fine except the log file reports Error 3 "The system cannot find the path specified" for files in only one subfolder, and deletes all the files in that subfolder from the flash drive.

The subfolder name is "Computer" (which as far are I know isn't a reserved name), and it has the same attributes and NTFS permissions as all of the others.

Any ideas what the problem could be?

A:RoboCopy Issue

Noone uses Robocopy?

1 more replies

Hello Everyone,

I have been working on this for the past three days getting no where.

The system I am trying this on is a Win7 64 bit Home Ed., what I am trying to do is get a batch file created where it copies certain files to an external hard drive. Yes I am already using the Windows Backup that is included but I want to do this as an extra measure.

I have been trying to get the following command to work:

robocopy C:\Users\pare80\Documents E:\backup\Docs /E /CREATE /MIR /SEC /ZB /R:3 /V /FP /TEE /XJ

It looks like the command ran, but when I go to the E drive the folder backup is there but nothing else.

Any help will be greatly appreciated.

Thank You,

-- ParE

A:Robocopy Issues

Take the switch /CREATE away from your string. It only copies the folder (directory) structure with 0-lenght files (placeholders). Your command string should otherwise work just fin. Remember to run command prompt as administartor.

1 more replies

Within ROBOCOPY i need to write a script that will compare one folder to the other. The differences will be copied to a third folder and after copied to a third folder be copied back to the second folder.

Compare Folder 1 to Folder 2. Differences in 1 to 2 get copied to Folder 3 and after copied it will be copied to folder 2.

Anyone have any ideas?

A:RoboCopy question

Hi and Welcome!
May be better in the development section of the forum, as that is for scripting.
Click the red triangle next to your post and ask for it to be moved.
Kind Regards
Anthony

1 more replies

I provide IT support for a small business with about 5 users each with their own computer. Their last IT guy setup Retrospect backup backing up the user folder to the server and then CrashPlan Pro was installed on the server to backup to their cloud service (because they let you backup an unlimited amount of data on a single computer for $10 per month). The first problem was that Retrospect doesn't save the data in a format that can be easily viewed to compare the backed up copy to the copy still on the original drive. The next problem was that one of the users got a message that their computer hadn't backed up in a few days so they uninstalled it from the server and reinstalled it but now it is asking for the key which nobody knows. So, I figured for so few users I could make a basic xcopy script set to run at login and I did and it worked...but several people have told me that robocopy is worlds better than xcopy. So, I know the format would be something like this for each user: robocopy c:\Users\Brittany \\server\Backup\Brittany /e /mir /z /fft /w:5 Would this work? Anything you would change? I have a few questions also... 1. What exactly does multi-thread copying do and how do I know if I should enable it? 2. Will this only copy new/changed files or everything? 3. I know the mir option deletes files from the backup that are deleted from the original...is it possible to have it back up the new and changed files daily but to wait a week or so before deleting a de... Read more A:Help with Robocopy user backups? ROBOCOPY - Create Backup Script 2 more replies Answer Match 39.48% System: Windows 7 Ultimate 64-bit german When I try to copy one dir to another dir ("robocopy.exe c:\test1 c:\test2 /e") the copy seems to be ok, but the result output in console it not complete and unformatted. It seems, that only the numbers of the expected output are displayed in one row.... Anybody here can help me with this issue? Thanks ahead... A:Strange Robocopy Problem Here an Screenshot of this issue...Both folders were emtpy. 3 more replies Answer Match 39.48% I have setup a bat file to copy my files to the linkstation. As Below: Robocopy "C:\Users\User\Documents\Janine" "B:\Documents\Janine" /MIR /E /SEC But when it gets to certain files it says access denied. How do I get it to copy these files with permissions... A:How to Robocopy my files to Linkstation. Hi, Which file is causing issues? Try this: Code: Robocopy C:\Users\User\Documents\Janine B:\Documents\Janine /MIR /E /COPYALL Regards, Golden 9 more replies Answer Match 39.48% I have a computer that is running Vista HP on its original C\: drive, that has a maintainance program that was preinstalled on my pc. I also purchased Vista Ultimate (retail version), that is installed as a dual boot. I originally ran HP for the business, running a program that used Sql Server, but it became corrupted, and was unable to be fixed, so I abandoned the drive with HP (C:\) and only use the drive with Ultimate (M:\) on it. I realize you cannot simply copy a program from one drive to another, because it will not result in an installed program. I am hoping that Robocopy will be my answer. I tried the following steps: I created a folder on my M:\ drive, the drive I now use, with the same program name as the original program on C:\. I then tried to run a command prompt script, with Administrative priviledges. ROBOCOPY C:\Program Files\[program name] M:\Program Files\[program name] Each time I run it, I get an error message: Robocopy is not recognized as an internal or external command, operable program or batch file. I realize I may have been able to add several switches to the script, but for some reason, my computer doesn't even want to recognize the Robocopy command. Any advise would be appreciated. Thanks Dave A:Unable to use Robocopy in Vista It appears that robocopy is not in the path environment variable and the command prompt cannot find it. If it is in the normal location (\windows\system32) this should not happen. But robocopy will not solve your problem. Installed applications have registry entries, and often other things as well, associated with them. Only the application installer knows about these things and only it can properly install an application. Robocopy has no hope of doing this. 2 more replies Answer Match 39.48% Hi, I'm new to using robocopy but I have used it for awhile with a couple of external drives to keep them in sync but using a simple command like: robocopy g: f: /E /R:2 this copies everything from the g: drive to the f: drive including empty directories and tries 2 times for failures. On my desktop which is a XP Pro machine as well, I've installed the Windows Resource Kit Tool which includes robocopy and am trying to do a similar thing to copy my "My Documents" directory on my c: drive to my k: drive which is an external drive on my mionet network. The copy does work fine but each time I run the robocopy command, a large number of the files get copied even though they haven't changed. I'm sure that I'm just missing something but I've tried adding things to the command line to not copy older files. Here's something that I have tried: robocopy "C:\Documents and Settings\Administrator\My Documents" "K:\ImageThat\My Documents" /E /R:2 /XO /A-:A each time that I execute this command, I get about 800 files that get copied and I don't understand why. Anyone see anything that I'm missing, or perhaps the way that I am understanding how robocopy works is the problem. thanks in advance! Bill More replies Answer Match 39.48% Hi, So I've just got myself a Crucial M4 256GB and want to move my existing Win 7 x64 installation off my HDD and on to my SSD. I've done all the preliminaries in Diskpart and have the drive marked as active. The last step is to copy all the files across (rather than use cloning software) with Robocopy. However, even in an elevated command prompt I'm getting 'Access is denied' errors on the important stuff. The command I am using is: Robocopy e:\ h:\ /e /copyall /dcopy:t /r:0 (e and h being what Vista has assigned each drive when trying it in that) also tried the /sec switch with no joy. I've tried this using the Windows 7 install DVD and within Windows Vista x86 (the HDD is a dual boot with 2 partitions; one containing 7 x64 and the other Vista x86). Any help on this one, please? A:Installed new SSD - Having Robocopy failures. I've added the /b switch in to the command line which seems to now allow copying of files previously denied. Shall see if this has done the trick once the copy completes. 3 more replies Answer Match 39.48% Gentlemen I need a nudge to get Robocopy going. We have 2 HDDs with our data on board. Recently I dropped the original from my desk to the floor. Its dead. Real dead. So now there is one...... left. I want to Robocopy it - the entire HDD (located drive F) name for drive is Terra 3. I have an empty 3Tb HDD waiting to receive the contents (located drive H) folder name> Terra 3 Back Up Write the steps & the formula please. I'm way too nervous. If I lose T3 I'll need to contemplate a window exit. A:Robocopy - nudged required ROBOCOPY is a folder copier, not a file copier. Thus, you need to specify each folder individually. Lets assume you have 3 folders called A, B and C. Each of those may have sub-folders beneath them, and each of these contain several files. Create a .bat file on your desktop as follows, then run it as administrator. Code: robocopy F:\FolderA H:\"Terra 3 Backup" /copyall /e robocopy F:\FolderB H:\"Terra 3 Backup" /copyall /e robocopy F:\FolderC H:\"Terra 3 Backup" /copyall /e The copyall switch copies all the file attributes. The /e switch copies any subfolders even if they are empty. Since this is the first time you are copying (and presumably its a once off) I would use XCOPY instead, since you do not need to copy each folder. ROBOCOPY holds no advantage over XCOPY for a one-off job. In an elevated CMD window, type as shown below, and hit enter: Code: xcopy F:\*.* /V /E H:\"Terra 3 Backup\ /v verifies each file after copying /e copies all folders/sub-folders even if they are empty Useful information if you insist on using ROBOCOPY: ROBOCOPY - Create Backup Script 2 more replies Answer Match 39.48% Hi, I want to use Robocopy to backup the data from my external hardrive D to a file called 'Backup' in a cluster storage W. I only want to backup the modified and new files. In other words, I don't want to back up all the files in D every time I run Robocopy. This is what I wrote by reading other posts on the forum: title Backup personal files robocopy D:\ W:\Backup /e /mir /np /tee /log+:backup_log.txt pause However, the script below does not back up all the files. Any suggestion on how I can improve the robocopy script? Thanks a lot for your help! More replies Answer Match 39.48% I use ROBOCOPY to synchronize files between my desktop and laptop machines via a USB flash drive. ROBOCOPY is set to copy only updated files. It worked perfectly under Windows 7, reporting and copying only "newer" files; under Windows 8 it marks and copies the newer files and marks all the others as "modified" and copies them as well, even when the "modified" files haven't been accessed or written to. Here is the command line I am using: %SystemRoot%\system32\robocopy C:"\users\Robert Jacobs\Pix" i:\Pix /PURGE /E /XO /FFT /XA:SH /DST /R:5 /W:2 /LOG+:C:"\users\Robert Jacobs\My Documents\work"\leap_down.log /TS /NP As I said, this worked perfectly under Windows 7; it seems to be broken in windows 8. How can I fix it? All help will be gratefully appreciated. Robert A:Robocopy problem under Windows 8 Could this be caused by the same problem that causes Windows File History to backup unmodified files? The following thread discusses this topic: Windows 8 File History - Excessive backup - Excessively saving copies of files (photos, videos, documents, etc.) The fix there was to disable Homegroup functionality. The question there was: Why is File History saving so many duplicate copies of my media, when I'm not making any changes to the media or metadata?!? Does anybody know? and the final solution to date is: Since I switched HomeGroup off, File History appears to be working sensibly. Only changed files appear to being backed up. My NAS is noticably quieter and my laptop far more responsive (as it isn't constantly backing up!!) Thanks all - nearly gave up on File History. More than happy to live without HomeGroup as it really isn't needed in Win 8 as Noel helpfully pointed out above. Could this be it? As far as I know, BOTH the File History and Robocopy use Shadow Copy functionality to copy locked files on-the-fly. So it looks like, the problem lies with how Shadow Copy works when Home Group functionality is turned on. Gentlemen, could you please verify that and check if switching Home Group off helps here as well or not? Well this is the world we live in And these are the hands we're given... 32 more replies Answer Match 39.48% Hi Using Robocopy, I should copy the files of a directories structure with all their ACL and their attributes except the attributes of reading in another structure. How should I do this? Thanks Bye A:Robocopy and attributes problem /copy defines the attributes you want to include (defaults to data, attributes and timestamps). /copyall includes everything including ACL. If you want to then make them read only add /a+R to set the Read-Only attribute. something like robocopy C:\users\user1\Documents E:\Backups\Documents /mir /e /copyall /a+R Is that want you want to achieve? Robocopy 1 more replies Answer Match 39.48% Hi In Windows 8.x, should I move the entire contents of a directory (containing files and directories) in a Media sub-directory. I have: Code: c:\Test c:\Test\<File_name1>.txt c:\Test\<File_name2>.txt c:\Test\b c:\Test\c I have tried with the command Code: robocopy c:\Test c:\Test\Media /move but it only moves the files of the Test directory. How come the move option of robocopy acts like the mov option that is to say moves only the files and not the directories? So, how do I move even the directory? Thanks Bye A:Robocopy /move problem Hello balubeto, You can trythis: First, create a new folder named "Test" under "C:\Test\Media", then enter the following code: robocopy c:\Test c:\Test\Media\Test /move If you want to move the whole "Test" directory, you cannot do it because the location you want is still under "Test" directory. 4 more replies Answer Match 39.48% I last used robocopy on 041209 and I updated my XP Home SP3 on 041609 and on 041909 I have found that robocopy does not work anymore. It will create the folder it is supposed to create but there are no contents in it. I have also tried xcopy and xxcopy and all they will do is the same. I repair reinstalled robocopy and the qui said "Please use Windows Update to check for any critical updates to the .NET Framework." This message was at the bottom of the gui and was a suggestion rather than a command about the .NET Framework updates. I have also run System File Checker. What could be keeping robocopy, xcopy and xxcopy from copying correctly? Below Added 042709 I have found that by pasting the robocopy argument from the command file into the Run box the backup occurs as expected. But the command file when clicked on still does not do the backup. Below are two versions that work when pasted into the Run box. robocopy C:\Annoyance C:\BackupAnnoyance robocopy "C:\Annoyance" "C:\BackupAnnoyance" /COPYALL /V /NP /R:10 /W:30 The results are the same when I use xcopy or xxcopy: clicking on the bat file does not backup anything but when I paste the bat files argument in the Run box the backup occurs. Sincerely, Teefermup A:Solved: Robocopy Does Not Work 8 more replies Answer Match 39.48% Didn't know where else to put this so I hope this is good. Twice now I have experienced a issue with robocopy where while copying a user folder it mass nests the Application Data folder within Local. It replicates this to both \User\AppData\Local and \User\Local Settings. Weird thing is Local Settings is just a place holder to point legacy programs to the new location so why robo copy created a folder from this I am not to sure. Both times I have had this happen it has replicated the Application Data folder so many times within itself that it fills the HDD down to the last byte. And since it is nesting it the path is far too long for any standard windows command to do anything with this structure. For example my last instance of it replicated about 15,000 files into over 200,000 from ~9GB to over 80GB and over 30 directories deep. Not sure if there is any end to it or if it does just keep repeating until the drive is full. Some loop issue with the local settings place holder? Anyway to delete this massively nested directory structure I have found two methods. 1. Boot into Ubuntu (or any distro of your chooseing... I like the Ubuntu live CD) and delete the folder from there. In Ubuntu it moves into the trash so you have to delete it from there as well. 2. Use robocopy again to copy over a nul directory. For instance I created a empty folder called empty on the root of C and then as follows ROBOCOPY C:\EMPTY "X:\USERS\ADMINISTRATOR\APPDATA\LOCAL\APPLICATION DATA&... Read more A:Robocopy mass nesting bug This sounds as though it could have something to do with junctions. Have you tried the command with the /XJ switch? You might need to use /XJD (Directory) or /XJF (File) switch instead. This switch tells Robocopy to ignore or eXclude the specified type of Junction point. These are included by default. 9 more replies Answer Match 39.48% I am using Robocopy to do a one way copy of changed user data files/directories from one computer to my server prior to running Backup. The syntax I am using is : robocopy y:\transport e:data\transport /copyall /E /log:e:\data\non-transport\logfiles\ Y is a mapped drive on my laptop. All newer files in the source directory and all of its subdirectories should be copied to the object directory The documentation on Robocopy is sketchy at best. I believe this syntax should only copy source files that are newer than those in the target directory. However, if the date/time stamps are equal, it copies the file. It appears to me that all of these copies are unnecessary and it just opens the door to errors. Can someone identify my error in thinking A:Robocopy results not as expected. Do I have Bad Font Odor? It seems that none of my posts ever get responded too, I try to be pretty discriptive in my subject and I get no responses. Some of the posts that say "Vista not working" get a magnatude of responses. When I used XCOPY /D only Sources file with the date/time stamp newer than the DT Stamp in the Object got copied. Robocopy seems to copy files from the source if the DT Stamp is newer or equal than that of the Object. Guess what, once it copies the newer file, the DT Stamp in each directory is going to be equal, no need to keep copying it. This should be a basic test before decommitting a working product, ie XCOPY, that has been around forever. Hopefully this is not "AS DESIGNED" Someone at least acknowldege that this has been read. 4 more replies Answer Match 39.48% Hi, I've been wanting to transfer my files from an old HDD to a new one exactly as they are, with the time stamps the way they are currently on the old HDD and all, and I heard that using Robocopy via the command prompt can help me do that. However, I don't want to delete everything on the old HDD. I've been looking around the internet, and anything I can find is just confusing to me. The old external HDD that has all my files and folders is J: and the HDD I want to transfer them to which is a new internal HDD is Z: What would be the proper command for copying everything on J: exactly as it is to Z: ? I hope I put this question in the correct section, lol, and as always, thanks for everyones help. - Guru - Windows 7 Home Premium 64x, 16gb ram, 4.20GHz AMD FX quad-core cpu, A:Solved: Right command for Robocopy. 16 more replies Answer Match 39.48% I have an older dual HDD enclosure that I cannot set up for mirroring with windows 7. Can someone help me with a robocopy script that will initially back up all the data from one of the drives to the other, then only the changing files after the first run? Thank you in advance. A:Robocopy for a Dual HDD setup The same command will do both - and it creates a mirror backup, removing any folders and files from the target that do not exist in the source. d: is the source and e: is the target This is untested: test it on a couple of USB sticks with test data on them first, as it can wipe the target drive very easily too. Code: robocopy "d:\" "e:\" /mir 1 more replies Answer Match 39.48% Uploaded the 3 working files, basically it is a script that closes outlook and saves any drafts and will then backup user profile including .pst that would be otherwise locked. My problem is when I try and use %username% in the source or destination in the job file (.RCJ) it will give me a message along the lines of invalid source destination C:/user/kriern/desktop/robocopy/user/%username%/ rather then just using the source i specify of user/%username% The file was sitting on my desktop (reason for the first part of directory) This works when i implement it in a .bat instead of a job file why does it stop working? Bat files have a 2000ish character limit and i do not want to run into issues when i get more and more specific with my exclusions I would love to be able to just throw it on users computers without changing anything and procced to use windows scheduler to run it , rather than edit the %username% to the correct one More replies Answer Match 39.48% Hi there, New to the forum, please go easy I've got a robocopy moving a file using /MOV from one folder to another. Is it possible to add a second destination so that the contents of the original folder will be moved to both destination folders? How would the syntax look? (below is current syntax) robocopy "\\source path" "\\destination path" /S /E /V /NP /MOV /XD in /R:10 /W:30 Thanks A:ROBOCOPY - /MOV to two destination folders Hi mate. You could do two things: 1. You can try to use ROBOMOJO to run multiple robocopy jobs more info here: Running multiple Robocopy jobs in one batch file or 2. You can run two separate robocopy jobs, with 10 minute interval between them. Check this post: One source to multiple destinations with Robocopy Hope this helps. 2 more replies Answer Match 39.48% I'm transfering around 216GB of files from my old hard drive to my new one using a SATA->USB converter cable (I only have one HDD slot). Using robocopy to transfer the files, the system freezes completely - nothing responds at all and any status LEDs that are lit at the time remain lit. My only option is to turn off the power. The clock will show the time of the crash (i.e., it stops). I've yet to 'witness' the crash, but when I leave the computer alone for a bit and come back later on, I find it locked up. Strangely, since then, I'm now using a normal drag+drop to copy the files, and it hasn't crashed in all the time it's been copying so far. There's nothing in the event logs... Any ideas? A:System freezes when using robocopy Quote: Originally Posted by CreepinJesus I'm transfering around 216GB of files from my old hard drive to my new one using a SATA->USB converter cable (I only have one HDD slot). Using robocopy to transfer the files, the system freezes completely - nothing responds at all and any status LEDs that are lit at the time remain lit. My only option is to turn off the power. The clock will show the time of the crash (i.e., it stops). I've yet to 'witness' the crash, but when I leave the computer alone for a bit and come back later on, I find it locked up. Strangely, since then, I'm now using a normal drag+drop to copy the files, and it hasn't crashed in all the time it's been copying so far. There's nothing in the event logs... Any ideas? Ken What version of Teracopy? I had similar problems with the free version. there is nothing in event viewer>windows log>applications? 8 more replies Answer Match 39.48% I am using robocopy to perform a data migration and running into an issue with copy...I am also trying to copy permissions from NT 40 server to a NAS...I am using the correct switches and get hte following error "The security id structure is invalid" and nothing gets copied over. If I leave the security switches out will copy data with no problem... Any ideas?? A:Robocopy error message Try running a chkdsk on the PC your copying from. It sounds like there may be a problem on that end. Please note that all files have a security IDs assigned to it and usually a chkdsk will find this and fix it. 1 more replies Answer Match 39.48% The default copy switch of robocopy is /COPYAT if you don't specify any copy options. This is the code I'm using: robocopy C:\ D:\Backup RAMDisk.img /copyall /R:5 /W:15 /V /log:\Users\Kevin\Desktop\robocopy_log.txt The RAMDisk.img file that I'm copying is a compressed image file. Now with that syntax /COPYAT will be used which means that it will copy all attributes of that file. Whenever I run this, I successfully copy the file but it doesn't retain the compression attribute of that file. What could be wrong with this? Both source and destination are NTFS-formatted. A:Backing up files using Robocopy Although compression is indicated via a file's attributes, I'm not sure if that particular property actually transfers with the copy, even with Robocopy. If you copy to a compressed folder (folder and contents) then I would think the copy would be compressed. And if that folder is not compreesed, files that are placed there will be uncompressed (even if you are copying a compressed file to that location). 9 more replies Answer Match 39.48% This line below is included inside a batch file for backups - robocopy "\\Xserver\d$\" "F:\HTV Data Vault\Servers\X Server\Data Drive D" /E /ZB /COPYATS /NP /w:30 /r:13 >> "F:\HTV Data Vault\Backup Log Files\server.txt"

Now when I run the batch I get this error -

-------------------------------------------------------------------------------
ROBOCOPY :: Robust File Copy for Windows :: Version XP010
-------------------------------------------------------------------------------

Started : Wed May 13 11:26:23 2009

Source - \\Xserver\d$" F:\HTV Dest - F:\HTV Data Vault\Servers\Data Files : Options : /COPYAT /R:1000000 /W:30 ------------------------------------------------------------------------------ ERROR : Invalid Parameter #3 : "Vault\Servers\X" I have another line of code that gives a similar error.... YET - when I run this line below in the batch file it works perfectly- robocopy "\\Xserver\c$\Documents and Settings\All Users\Desktop" "F:\HTV Data Vault\Servers\X Server\Desktop" /E /ZB /COPYATS /NP /w:30 /r:13 >> "F:\HTV Data Vault\Backup Log Files\server.txt"

I am at a loss here as to why robocopy isn't processing my line correctly.

Can anyone help me on this?

A:Having a Syntax Problem with Robocopy

robocopy "\\Xserver\d$\" "F:\HTV Data Vault\Servers\X Server\Data Drive D" /E /ZB /COPYATS /NP /w:30 /r:13 >> "F:\HTV Data Vault\Backup Log Files\server.txt" Now when I run the batch I get this error - Source - \\Xserver\d$" F:\HTV
Dest - F:\HTV Data Vault\Servers\Data
Click to expand...

The \ after d$is the problem. Robocopy expects another folder name in the source path. It takes the 'quote space' as the start of the folder name. The next " terminates the leading quote. It then reads up to the next space to terminate the source path producing the source you see in the Error. At least it seems like that's what it is doing. so use this instead: Code: robocopy "\\Xserver\d$" "F:\HTV Data Vault\Servers\X Server\Data Drive D" /E /ZB /COPY:DATS /NP /w:30 /r:13 >> "F:\HTV Data Vault\Backup Log Files\server.txt"
HTH

Jerry

3 more replies

Hi Everyone,
New to the forum here and would like to throw this scenario out to all the Tech Support Guy users out there.

A little background:
I use backup exec 10d to run our backups: full backups on weekends, and diffs during the weekdays. Attached to my fileserver (Win 2000) are 2 arrays; a production and backup array (which we robocopy to everyday and evening).

Last week we ran into some NTFS corruption so we took the production array offline made the backup array the production array and robocopied the data to the new production array. After the robocopy we ran a chkdisk on the NTFS corrupted array.

When the Diffs ran that night, the archive bit must have been reset because the job ran as if it were a full backup job.

Here's the problem:
It's happened again and we need to cut over to our backup array. I haven't figured out a way to "save" the archive bit through robocopy (still figuring out all the switches).

Question:
Would the /B switch in robocopy do the job? Here's what I'm currently using:

del /q /f f:\rcd.txt
robocopy d:\ x:\ /V /FP /XF db.* /TEE /LOG+:f:\rcd.txt /E /PURGE /COPYALL /Z /ETA /R:2 /W:1

In the event I need to cut over to my backup array and run my nightly diff, I don't want to run into a scenario where a full is running during the week. Any and all help is appreciated!
Thanks,
RossDey

A:Saving the archive bit through Robocopy?

When you do a copy in almost all cases the archive bit is reset.

You have a few options maybe use something like -
http://www.theutilityfactory.com/summaries/copy-files.htm

Where it looks as though it retians all attributes when it copies (I have not tried this it is just an example).

Another thought is possibly find a way to script out a way for it to search all files that have the archive bit set to ON (the files you want in your incremental) also known by attrib +A and make sure to set it after the copy with the attrib command?

What your looking for isn't right there within the robocopy functionality though sorry. You could skip the entire backup and set all the attribs in the file off with /A-: A but this would then totally defeat the incremental and make it so nothing is backed up.

1 more replies

Uploaded the 3 working files, basically it is a script that closes outlook and saves any drafts and will then backup user profile including .pst that would be otherwise locked. Exclude.txt should be exclude.rcj but its a non allowed filetype

My problem is when I try and use %username% in the source or destination in the job file (.RCJ) it will give me a message along the lines of

The file was sitting on my desktop (reason for the first part of directory)

rather then just using the source i specify of user/%username%

This works when i implement it in a .bat instead of a job file why does it stop working?

Bat files have a 2000ish character limit and i do not want to run into issues when i get more and more specific with my exclusions

I would love to be able to just throw it on users computers without changing anything and procced to use windows scheduler to run it

More replies

I apologize if this forum is meant for tech people as I'm a novice computer user, but I really need help.  I have Windows 7 x64 and I used RoboCopy for the first time, and have messed up royally.  I was trying to copy folders and files from my
computer to an external hard drive.  My external hard drive had important files and folders on it already, and I thought that copying more data using RoboCopy would just add to it, but it deleted everything that was on the external hard drive when it
Can I undo what just happened?  Is there any way to revert?  Or maybe there's some way to recover that deleted data?
I used:  Robocopy C:\Users\Name\Documents F:/MIR /dcopy:T
I would be really grateful to be helped.  Thanks in advance.

More replies

hi friends.
here is my batch file to copy all data from C:\Data to N:\Full Backup\DD Directory using robocopy.exe in windows Vista

Code:
robocopy "C:\DATA" "N:\Full Backup\DD" /S /B /256 /R:10 /W:10
pause
and the directory depth is really really really long but i guess the /256 should be able to handle it. I don't know why it's not working.
Directory Structure: C:\DATA\office secretary\Office Board\General Assembly of our Office\19th FIN Jepaul General Assembly & Board Metting 2009 September\18th General Assembly & Board Mtd 21& 22 August 2009
FileName: GA 18 - Apolgoy Letter to sir for. shawai for his signature- Sept. 2.doc
C
This is the output when i run the batch file
-------------------------------------------------------------------------------
ROBOCOPY :: Robust File Copy for Windows
-------------------------------------------------------------------------------

Started : Fri Sep 17 22:22:50 2010

Source : C:\DATA\
Dest : N:\Full Backup\DD\

Files : *.*

Options : *.* /256 /S /COPYAT /B /R:10 /W:10

------------------------------------------------------------------------------

0 C:\DATA\
0 C:\DATA\office secretary\
0 C:\DATA\office secretary\Office Board\
0 C:\DATA\office secretary\Office Board\General Assembly of our Office\
0 C:\DATA\office secretary\Office Board\General Assembly of our Office\19th FIN Jepaul General Assembly & Board Metting 2009 September\
1 C:\DATA\office secretary\Office Board\General Assembly ... Read more

A:Solved: Robocopy in Windows Vista

That particular path is 259 characters.
The /256 switch turns OFF long path support, meaning it will fail with long paths. Try removing that switch.

2 more replies

I want to copy "App Launcher Gadget" folder to "AppLauncherSettings" folder. I have tried several ways and only get the files copied or invalid directory.

A:Cannot get Xcopy or Robocopy to copy folder

6 more replies

In xp or 2003 robocopy log transfer speed at the end log file. How to get this in w7 or 2008 r2?

thanks

A:Robocopy transfer speed in log file

Logging options
/L : List only - don?t copy, timestamp or delete any files.
/NP : No Progress - don?t display % copied.
/LOG:file : Output status to LOG file (overwrite existing log).
/UNILOG:file : Output status to Unicode Log file (overwrite) ##
/LOG+:file : Output status to LOG file (append to existing log).
/UNILOG+:file : Output status to Unicode Log file (append) ##
/TS : Include Source file Time Stamps in the output.
/FP : Include Full Pathname of files in the output.
/NS : No Size - don?t log file sizes.
/NC : No Class - don?t log file classes.
/NFL : No File List - don?t log file names.
/NDL : No Directory List - don?t log direct... Read more

5 more replies

Hi guys,
I'm setting up an archive process to store old files on an external hard drive. The computer in question is running Windows 7 Pro 32bit. We have a server folder with 150,000+ files in it, most of which are pretty small (below 200k). I'm trying to use robocopy in a batch file to do this. It was working fine the other day, now all it does upon launch is sit there. It shows me all the options and whatnot, and also lists the number of files in the directory and the directory itself, but it never gets past that line. If I switch the destination to the local C drive, it eventually starts copying files. Is there something in my batch file that needs to change? Or could there be a problem with the external Western Digital drive that I'm using? Here is the one line batch file I have:

Code:
robocopy "\\cgifp01\Prepress\Public\ImportedPDF" "E:\OldFiles" *.* /R:2 /W:10 /MINAGE:15 /MOV /B /XJ /XF "blank_test.pdf"
Any help would be great, thanks!

Nate

A:Robocopy launches and then hangs/just sits there

Well for anyone else struggling with the same problem, here's how I got around it. I changed the batch file to copy from the network location to a temp folder on the external drive. Then I have another line that does a robocopy from the temp location to the actual archive folder. I have no idea why that works, but it does. It doesn't make any sense to me, since robocopy is still having to copy files into the external directory, but maybe since it's not copying from the network it works better. I have no idea. All I know is that it works now.

Nate

1 more replies

Hi, I just started using Robocopy to backup my files to my JBOD recently and I noticed that it does not copy anything in My Document folder. Here is the result log for Robocopy regarding the backup.

Quote:
------------------------------------------------------------------------------

Total Copied Skipped Mismatch FAILED Extras
Dirs : 4287 0 4287 0 0 0
Files : 34164 22831 11333 0 0 0
Bytes : 107.783 g 90.408 g 17.375 g 0 0 0
Times : 20:32:46 2:02:26 0:00:00 0:15:26

Ended : Mon Sep 08 02:58:21 2014

-------------------------------------------------------------------------------

Even though it says that it copied 22831 files the destination folder says it has not been modified at all.

The strange thing is that when I was checking back on the progress in the cmd window, it showed that it was copying files. The problem is I have no idea where those files went, the files that were supposedly copied aren't there at all. Here is the script I used to back up my files.

Quote:
robocopy F:\Anime G:\Anime /mir /copyall /np /tee /mt /log:"C:\Users\C.C\Desktop\my_backup_log.txt"

robocopy "E:\Disk Backups" "G:\Disk Backups" /mir /copyall /np /tee /mt /log+:"C:\Users\C.C\Desktop\my_backup_log.txt"

A:Robocopy not copying My Document files

CC mate I don't understand the Robocopy stuff and personally I use the Macrium for back up / imaging it is free and so easy to use.
Just a suggestion to get you out of strife
Imaging with free Macrium

9 more replies

I am backing up an entire drive to a external hard drive using Robocopy. Is it safe to use /mir on root drives? I've read somewhere that it's not recommended as it copies the hidden folders $RECYCLE.BIN and System Volume Information and may cause issues on the destination drive. Is there anything truth to this or is it just a myth? A:Is it safe to use Robocopy /mir on root drive? Hi, I am not familiar with robocopy, but you can try this link to help you with your issue: https://technet.microsoft.com/en-us/.../ee851678.aspx 8 more replies Answer Match 39.06% Apologies if the solution is found in another thread, but I have been unable to solve my problem so far. I'm attempting to use Task Scheduler, to backup a folder of my projects to a 1 Tb USB drive via robocopy. I've been at this off and on for several days now, and I have had varying degrees of success. I work at a corporate company where IT can be strict. I have admin rights to my machine but I feel like I am still fairly restricted. Currently, I have a .bat file, that when I run, it fails because I do not have backup and restore file user rights. Great. I get that. That is not my main problem. I know I need to change permissions some how. As far as I can tell, I have admin rights to all of the appropriate folders. I checked by right clicking, looking at security and seeing my user name in the groups and seeing that I have Full control, modify, read & execute, etc. C:\Users\"MyUserName"\ - Full control C:Users\"MyUserName"\_Projects - Looks like I have inherited full control rights Side note, This may seem very noobish but I don't remember all of the folders being -Read Only- before. Not sure if this is a problem or if I did something to cause this. Back to my main problem. At some point, I was able to run an iteration of my .bat file successfully, when I ran it manually. It copied all of the files I wanted to the correct USB drive. It was only once I tried to add it to Task Scheduler, the .bat file would fail. I... Read more More replies Answer Match 39.06% Hi I've just re-organised my hard drives and I've set up a batch routine to backup my files, using Robocopy. However, as I swapped my drives around, I've copied in the wrong direction. Robocopy has consequently deleted entire folders of important data. The data isn't in the recycle bin. What should I do to try and recover the data? Thanks A:Used Robocopy and deleted my files - how can I recover them? Is the partition unharmed and still visible in Explorer and Windows Disk Managment? If it's unharmed, I'd consider PhotoRec or Recuva to recover the files. Both are free. Ontrack Easy Recovery Professional is also said to be excellent, but I think you ultimately have to pay. Maybe$79?? It will show you the files it can recover, but won't let you actually recover them until you pay.

I'm assuming Robocopy doesn't have any type of "undo" capability.

5 more replies

I am trying to use robocopy to backup files over our home network, from my daughters computer, to my backup drive. Unfortunately, she is sharing about 20 folders on her computer, and the only way I can get it to work is to write a separate command for each folder:

robocopy "\\CHRISTINE\Music" "K:\Christine\Music" /mir /z
robocopy "\\CHRISTINE\Photos" "K:\Christine\Photos" /mir /z
robocopy "\\CHRISTINE\Video" "K:\Christine\Video" /mir /z
etc...

I tried entering just "\\CHRISTINE" but this results in a path not found error.

Is there a way to get Robocopy to locate all the shared folders on her computer automatically (in case she shares new folders without my knowledge)?

Thanks,

Anthony

A:Robocopy - All Folders on a network computer?

9 more replies

I'm using robocopy (ver XP010) on a Windows XP laptop to copy user files to another drive for backup.

robocopy "c:\my documents" "Z:\myname\my documents" /XO /M /ZB /E /MIR /log:c:mylog.txt /TEE

It creates all of the directories and subdirectories but doesn't copy any of the files. The log shows no errors - total dirs 162 copies 162, total files 1458 skipped 1458.

To minimize variables I tried using a new usb external NTFS hard drive (Z) but it still skips all of the files. I've verified the permissions and owership of the files and everthing seems in order. The problem is limited to this computer, the other computers in the group are OK. Any suggestions?

I just found out that 2 of the 6 computers in this group fail so I will be compairing files and permissions etc. to see what the two failed ones have in common against the working ones.

A:Solved: Robocopy skips all files

7 more replies

Hello,
I'm trying to do the equivalent of xcopy /t /e in robocopy.  That is, I only want to copy the folder tree, not the files themselves.
-Charlie

A:using robocopy to copy folder structure only

It looks like the  /e /xf * switches are what I want.  /e copies empty directories.  /xf * tells it to exclude all files.

7 more replies

I have a well-defined backup routine using RoboCopy, which I love.  But the last time I used it, it created a backup of all File History files as well - and they took up 120 GB of HDD storage that I need for other uses.
How can I prevent this?  I have no desire for File History's history of changes - I just want to copy the files as they are.  For me, that says RoboCopy.
Can you help?
Richard Tamir

More replies

Hello all,

I need to robocopy many files which starts with the same name for Example (Ari, Arit, Ariel, Arik, Aris)
I tried robocopy source_file\ari*.* destination_file\ari*.* however it is nto working do someone can help with that.

Thanks Orfi

A:how to robocopy files with similar names

Hi,

Your syntax is a bit out. Try this:

Code:
robocopy E:\Test\ Ari* F:\Test\ /e /mir
Regards,
Golden

9 more replies

hi,

I have a standard Windows 10 build and I'm using robocopy to backup my data to an external drive. The goal is just to capture all my data so if the PC fails/gets stolen etc. I can restore my data on to another PC.

I'm doing a backup of c:\users\ as this seems to capture all my data. Are there any other folders you think I should backup?

I've excluded the 'AppData' folder as this seems to have a lot of stuff which is not data. Is that OK or do you think that should be backed up? Are there any other folders you think I should skip?

More replies

Hi,
I'm wondering if anyone might be able to shed some light on why I am getting the following such errors when running a robocopy batch file (as administrator) which cause the backup script to stall (- albeit temporarily):

Quote:
2013/07/30 21:10:43 ERROR 5 (0x00000005) Copying File C:\Users\Tim\My Documents\Harey 8-128.jpg
Access is denied.

Waiting 30 seconds... Retrying...

2013/07/30 21:12:20 ERROR 5 (0x00000005) Copying File C:\Users\Tim\My Documents\TimsData\Year1.pdf
Access is denied.

Waiting 30 seconds... Retrying...

2013/07/30 21:15:27 ERROR 5 (0x00000005) Copying File C:\Users\Tim\My Documents\TimsData\Tim\Heddon's Mouth - Printable Walk - South West Coast Path.htm
Access is denied.

Waiting 30 seconds... Retrying...

I am using the following backup command:

Code:
robocopy "%srcPath%\My Documents" "%dstPath%\My Documents" /b /v /ts /fp /bytes /tee /e /dcopy:t /copy:dt /a-:sh /xf desktop.* /np /log+:%logPath%\mwk1log.txt
I realise that if I limit the retries and wait time from the defaults the stall time will be shortened and the file(s) skipped. However, that does not resolve the issue why robocopy is having a problem copying the file(s).

I have found that if the erroring files are moved from the source location to the desktop, the following errors arethen recorded in the log:

Quote:
2013/07/30 21:11:13 ERROR 2 (0x00000002) Copying File C:\Users\Tim\My Documents\Harey 8-128.jpg

A:Robocopy Backup - ERROR 5 (0x00000005)

Hi,

I have seen instances of a bug with the dcopy:t switch - try the script without that switch. You could also try the COPY:DATSOU switch, although I'm unclear if that copies the folder time stamps too.

Code:
robocopy "%srcPath%\My Documents" "%dstPath%\My Documents" /b /v /ts /fp /bytes /tee /e /copy:dt /a-:sh /xf desktop.* /np /log+:%logPath%\mwk1log.txt

9 more replies

Our Windows 7 backup machine uses robocopy to differentially refresh a file server backup each evening. Unfortunately, users use Microsoft Outlook with PST files, which are locked by Outlook. I often noticed that when users had not closed Outlook by the
time the backup reached their PST file, robocopy failed to update the file.
I thought that was a non-issue since such cases only happen to about 2 users each day, but I had the surprise to discover that when robocopy fails to update, it deletes the outdated files (/MIR implies /purge).
Do others get the same result? If so, can this be avoided? I did not find any option to ignore locked files in the documentation. I suppose this would not happen without /purge, but /purge is somewhat necessary (a simple directory rename could otherwise
largely inflate space usage).

More replies

I have set up some RoboCopy tasks that run fine when run from the desktop link, but being forgetful I thought I would try to run them automatically using Task Scheduler. I followed the instructions in the tutorial and all appeared to be fine. However the tasks did not run so I checked them in Task Scheduler and last run stated 'Never'. I then chose to 'Run' them Task Scheduler and got the following dos report:

(The smiley is ColonD at)
REPORT:
Simple Usage :: ROBOCOPY source destination /MIR
source :: Source Directory (drive:\path or \\server\share\path).
destination :: Destination Dir (drive:\path or \\server\share\path).
/MIR :: Mirror a complete directory tree.
For more usage information run ROBOCOPY /?
**** /MIR can DELETE files as well as copy them !
C:\Windows\system32>robocopy "C:\Program Files (x86)\Microsoft Money 2005" "K:\M
oney File Backups" /e /np /tee /mt:4 /log+:my_backup_log.txt
2014/01/03 10:25:38 ERROR 5 (0x00000005) Opening Log File C:\Windows\system32\my
_backup_log.txt
Access is denied.

-------------------------------------------------------------------------------
ROBOCOPY :: Robust File Copy for Windows
-------------------------------------------------------------------------------
Started : Fri Jan 03 10:25:38 2014
Source - C:\Program Files (x86)\Microsoft Money 2005\
Dest - K:\Money File Backups\
Files :

A:Using Task Scheduler fails to run RoboCopy.

Code:
2014/01/03 10:25:38 ERROR 5 (0x00000005) Opening Log File C:\Windows\system32\my
_backup_log.txt
Access is denied.
I think the basic problem is you are trying to save the logfile to a Windows protected folder.

My suggestions is to use your robocopy bat file from your desktop....not C:\Windows\system32\

Try that and let us know what happens.

BTW : you run robocopy /? from an elevated command prompt as explained in the tutorial - not from Windows search.

9 more replies