Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Using Task Scheduler fails to run RoboCopy.

03 Jan 2014   #1
Trapper

Windows 7 Professional 64bit
 
 
Using Task Scheduler fails to run RoboCopy.

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 :
Options : /TEE /S /E /COPYAT /NP /MT:4 /R:1000000 /W:30

------------------------------------------------------------------------------
ERROR : Invalid Parameter #7 : "/log+:my_backup_log.txt"
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:\Users\Alan\Documents\Outlook Files" "K:\Outlook
Files - NEW 21 03 2012" /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:\Users\Alan\Documents\Outlook Files\
Dest - K:\Outlook Files - NEW 21 03 2012\
Files :
Options : /TEE /S /E /COPYAT /NP /MT:4 /R:1000000 /W:30
------------------------------------------------------------------------------
ERROR : Invalid Parameter #7 : "/log+:my_backup_log.txt"
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 /?


END.


I entered ROBOCOPY/? in the Win7 search box but got no help screen.


The above only shows a proportion of the commands set up in RoboCopy so I reckon it gave up trying to run and reported only the above errors, only a guess though!


Any suggestions as to what may be wrong based on the above report?

These are some of my RoboCopy lines:
robocopy "I:\DATA" "K:\DATA" /e /np /tee /mt:4 /log:my_backup_log.txt
robocopy "C:\Program Files (x86)\Microsoft Money 2005" "K:\Money File Backups" /e /np /tee /mt:4 /log+:my_backup_log.txt
robocopy "C:\Users\Alan\Documents\Outlook Files" "K:\Outlook Files - NEW 21 03 2012" /e /np /tee /mt:4 /log+:my_backup_log.txt
robocopy "C:\Users\Alan\AppData\Roaming\Mozilla\Firefox\Profiles\00nrkh7f.default" "K:\Mozilla File Backups" /e /np /tee /mt:4 /log+:my_backup_log.txt
robocopy "C:\Program Files\Microsoft Office\Office14\Queries" "K:\Queries Alans Address Book 02.xls" /e /np /tee /mt:4 /log+:my_backup_log.txt

Many thanks
Alan.


My System SpecsSystem Spec
.
03 Jan 2014   #2
Golden
Microsoft MVP

Windows 7 Ult. x64
 
 

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.
My System SpecsSystem Spec
03 Jan 2014   #3
Trapper

Windows 7 Professional 64bit
 
 

Thank you for the fast reply Golden, I can run the file manually without any problems from my desktop but I would like to use Task Scheduler to run it on a regular basis, I would really like it to run as shutdown if that is possible but it seems I can only chose a time and run asap if a run is missed.
I am printing off the tutorials about backups and images as I do not seem to have an actual windows backup set up yet!
I have just bought a 2TB WD My Passport drive for system and file backups, now I just need to find out what will be best.

Regards
Alan.
My System SpecsSystem Spec
.

03 Jan 2014   #4
Golden
Microsoft MVP

Windows 7 Ult. x64
 
 

No worries Alan......another option is SyncToy. May be a little easier for you?

SyncToy - Backup User Data
My System SpecsSystem Spec
03 Jan 2014   #5
Trapper

Windows 7 Professional 64bit
 
 

Thank you for the link to Synctoy, I have printed off the tutorial and will read it as soon as I can, I may be back with a few ???'s so be ready!

Thanks again.

Alan.
My System SpecsSystem Spec
04 Jan 2014   #6
Trapper

Windows 7 Professional 64bit
 
 


I have installed SyncToy and printed off the tutorial. I note in step 1 of 'Using SyncToy' it shows to choose your folders, I selected a left folder named I:\DATA. I: is my main external drive which has a folder named DATA and made a new folder in my external 2TB M: drive called Synctoy DATA. I selected this new folder as my right folder. (M:\Synctoy DATA).

My I:\DATA folder contains about 15 sub folders each with its individual files, around 700 across these sub folders in total and as suggested used the ECHO option. I named the pairing of folders as 'I DATA Backups'.

I previewed the I DATA Backups in Synctoy and instead of 15 folders I found 700 files, if I did this with my music folder containing around 60 sub folders with about 30~50 songs in each that would mean a listing of 2,000+ plus songs. I have many other folders with sub folders I wish to back up as they are.

Is it possible for Synctoy to maintain my existing folder structure in the backup and not extract every sub folder file? Or, would I need to 'pair' every folders 'sub folder' on a one to one basis? A very long and laborious task! If so I think I may be better off with with Robocopy and hope I can find a way to use Task Scheduler to run it automatically. Or put up a post-it note to remind me.

I prefer to have exact and direct copies not compressed or in a format that needs another program to open them.

Thanks for your help.
Alan.
My System SpecsSystem Spec
04 Jan 2014   #7
Golden
Microsoft MVP

Windows 7 Ult. x64
 
 

Alan,

1. Please copy the text in the code box below to a new instance of Notepad.
2. Save the file as test.bat on your desktop
3. Right-click on test.bat and run as administrator

It should backup everything in I:\Data to your M: drive in a folder called \Backup_DATA. Please report back if it does that.

Code:
robocopy I:\DATA M:\Backup_DATA /e /mir /np /log:backup_log.txt
pause
My System SpecsSystem Spec
04 Jan 2014   #8
Trapper

Windows 7 Professional 64bit
 
 

Hi Golden.
Thanks for your reply.

I did as you suggested and the I DATA file was copied to my M drive correctly. Thank you.

I would like to be able to set Task Scheduler to run the scripts as in my post 1 automatically but something is not working, if I (you? ) can sort out what the problem in Task Scheduler is then I will be a very happy bunny.

Thanks
Alan.
My System SpecsSystem Spec
04 Jan 2014   #9
Golden
Microsoft MVP

Windows 7 Ult. x64
 
 

Alan leave it with me for a day or so, and I'll work it out
My System SpecsSystem Spec
04 Jan 2014   #10
Trapper

Windows 7 Professional 64bit
 
 



Thank you, your help is very appreciated!

Regards

Alan.
My System SpecsSystem Spec
Reply

 Using Task Scheduler fails to run RoboCopy.




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
Task Scheduler - Create Task to Display a Message Reminder
How to Display a Message Reminder in Windows with Task Scheduler This will show you how to create yourself, or another user or group, a message reminder scheduled to display for when and how often you like in Windows 7 or Vista using Task Scheduler. All users on the computer will be able to...
Tutorials
robocopy script is not working through Scheduler
Dear All, My batch file of robocopy is working fine. But when I tried to run it through task scheduler, none of the files transfer to the target location. @echo off echo +-----------------------------------------+ echo Database Export Utility for server ...
General Discussion
Task Scheduler Fails when Running VB Compile EXE
Hi Everyone, I am puzzled. I created an exe with Visual Studio 2010 to automate the execution of a 2nd program. This exe requires 2 command line arguments. When I run this exe from a Short cut with the arguments defined everything works as desired.
General Discussion
Need help creating a task scheduler task to move files over a network.
Hello everyone, I need to have a task run that will move the contents of a folder from one computer to another over my home LAN. Files get downloaded during the night on one computer and then need to be transfered to another. Usually I am doing this by hand, but then though maybe I could get...
General Discussion
Task scheduler unable to load task status/active tasks at startup.
My task manager is unable to load task status/active tasks at startup. I get the message: "The selected task "{0}" no longer exists. To see the current tasks, click Refresh." When I refresh I get the same message. I checked and found that under Microsoft the problem was in the defrag...
Performance & Maintenance
Task Scheduler failing to start task with merged network locations
I have two routers I usually connect to (work and home) and each have wireless access. That means there are essentially 4 network locations I have listed. I have merged each respective network location (wired and wireless) into their own singular network location - "Work" and "Home". I also...
General Discussion


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 07:42.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App