Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Batch File

Status
Not open for further replies.

iankb

Technical User
Apr 3, 2002
11
GB
I need a batch file that is set to run every day that copies 3 files from a Windows 2000 Server onto a specified network drive in the AD.

Can anyone help me on this?
 
You could create a batch file:
copy c:\file1.txt z:\
copy c:\file2.txt z:\
copy c:\file3.txt z:\

Then use Windows Task Scheduler to run it every three days.
(when you choose "daily" in Task Scheduler and click next, the next window allows you to choose every three days).



 
Frank4d's solution is all you need with an addition:

Scheduled tasks run in the security context of the local system. This means that a normal scheduled task cannot access network resources on another machine. You need to create a domain account that has rights to both the local folder you're getting the files from and the network share you're copying them to. When you create the scheduled job, go into the properties and set the job to run under the account you created. (Make sure to set the password on the domain account to never expire since you need to explicitly enter that password into the scheduled job so it can log on.)

Jeff
[purple]It's never too early to begin preparing for [/purple]International Talk Like a Pirate Day

"The software I buy sucks, The software I write sucks. It's time to give up and have a beer..." - Me
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top