
- #WINDOWS TASK SCHEDULER BATCH FILE FULL#
- #WINDOWS TASK SCHEDULER BATCH FILE PASSWORD#
- #WINDOWS TASK SCHEDULER BATCH FILE WINDOWS#
I remember I copied the scripts when I left, but who knows where they are now.I don't know if this will help, but in bashing my head against one problem after another for far too many hours, I finally got my own batch file to work properly as a scheduled task. My programming classes included Cobal and JCL. vbs or powershell, but I am not really a programmer. Probably something much more elegant could have been made in. This provided some protection from damage from a possible disgruntled employee. The users could read their backup files, but could not delete the backup.
#WINDOWS TASK SCHEDULER BATCH FILE FULL#
I had full error checking on the config files since users would edit them, and I would get emails on any problems. This was run daily at 12:01am.įinally the backup script would parse the config file that was passed to it by the scheduler and using robocopy would copy all of the files. I ran this script on the server every 5 minutes, as it took no processing time and I like the security feature of alerting me when a new system was plugged into the network.Īnother script would parse all of the individual backup configuration files and schedule a task to run a backup on that system. They could also specify the time for their backups so it wouldn't happen when they were in the office. The user could modify this file and list any directories that needed backed up. (I had a config file that it would parse for systems to skip.) Each new system had a backup directory created for it and an backup configuration file placed in it.

It would create a text file of all the system names, and alert me via email of any new systems that it found. I made one script that would scan the network for systems. The only external program that I used was Cgywin's Grep command, and a command prompt smtp mail sender. cmd scripts that would backup essential files for every system on the network this way.
#WINDOWS TASK SCHEDULER BATCH FILE PASSWORD#
Feed robocopy the password from a text file that only domain admins can access. Create a domain admin account just for the backup process. Or better yet, run the backup on the server itself.

The system cannot find the path specified.įollowed by ERROR 3 (0x00000003) Creating Destination Directory Y:\temp\Īnother option is just to use the full network path, as Robocopy supports them. I write to a log and get ERROR 3 (0x00000003) Getting File System Type of Destination Y:\temp\ I create a Task Scheduler job to run the exact same command, whether user is logged in or not, with highest privileges.

I launch the command prompt as administrator and run C:\Windows\System32\Robocopy.exe C:\temp Y:\temp I map the network share to drive letter Y.
#WINDOWS TASK SCHEDULER BATCH FILE WINDOWS#
Also note I have done this registry tweak to access mapped drives from an elevated command prompt.ĮDIT: To clarify, logged in as the local admin, I launch Windows Explorer as administrator. However I always get the error "The system cannot find the path specified." in the Robocopy log when running this from Task Scheduler, even though the command works fine from an elevated command prompt (job is set to run with highest privileges). I would prefer to map the network drive normally on a semi-permanent basis so the Task Scheduler job just has to run Robocopy and refer to the appropriate drive letter. This solution of temporarily mapping and unmapping the network share works but it leaves my password exposed in plain text for anybody who looks at the Task Scheduler job actions.

I have to use domain credentials to access the network share but the local computer is not on the domain, and the job is run as a local admin. I have a Task Scheduler job to run Robocopy for backing up local files to a network share.
