Creating a simple batch file to backup files or folders is a cool way to move, copy, and backup any file you like.
A batch file is a text file saved as a .bat extension and when doubled clicked on it will execute the dos commands contained in that file.
In this article I will be using the xcopy command and the robocopy command to create a batch file to copy a file or folder. If you have Windows XP you will use xcopy for your batch file and if you have Windows Vista you can use the new command, robocopy.
I need to schedule a task in Windows Server 2003 that executes this script that deletes files older that n days in the specified folder. The script needs 3 parameters:%1 path to folder where files need to be deleted%2 file names (es.log)%3 number of days @echo off forfiles -p%1 -s -m%2 -d -%3 -c 'cmd /c del /q @path'. The script creates an emtpy backup file for me as well with win 2003 server. I found out that it ignores the first line in the config file. Config file: c: test1 backup c: test2 backup c: test3 backup. The first line may be empty. Hope this helps and thanks for your script.
- Dec 27, 2019 5. If you like to use this freeware to handle the scheduled backup, you can just click OK and go to the next step. If you want to Task Scheduler to run the backup, click on the Advanced tab, and check the option Use Task Scheduler to run this backup. Click “Start Backup” to start this file backup. Go to Task Scheduler to find this.
- The source computer is running Windows Server 2008 R2, and the destination machine is running Windows Server 2003 R2. I want to create a batch file that will run on the source computer, and copy all of the files in the D: MICROS folder to a separate network drive. Marketing TeraByte marketingdata MICROS TESTBKUP is where the files will need.
- I'm using NTBackup on a server 2003 R2 system, to backup to a file over the network, using a batch script. What I'm trying to do is to change the name of the backup set as displayed in NTBackup's 'Restore and Manage Media' tab (highlighted below), as the list will become unmanageable when it gets larger.
How to create a batch file
- Open Notepad by going to the start menu>all programs>accessoires>then choose Notepad.
- Type your commands into the notepad file.
- Then go to the file menu at the top and choose Save As.
- Now save the file as Yourfilename.bat
Some examples on what to write in a batch file to copy or backup files
xcopy “C:Documents and SettingsYour usernameMy DocumentsMy Pictures” “H:backup of pictures” /e /y
Schedule Server 2003 Backup Batch File Free
This command will backup my pictures on C: drive and paste it to H: drive in a folder called backup of pictures. If you put the destination as just H: than all the files will be all over the place. You must specify a folder. I usually make a new folder first. Of course you can also get the batch file to make the new folder for you but this is another article altogether.
/e means to copy all directories and sub directories
Backup Batch File Windows 10
/y means to copy with prompting to overwrite the already exsisting files
Xcopy Backup Batch File
See more xcopy commands.