apocalypse11
Technical User
Hello everyone... i have some questions about a batch file that does a copy to another folder with the date. please see below:
@echo off
:: variables
set drive=C:\Folder
set folder=%date%
set backupcmd=xcopy /s /c /d /e /h /i /r /k /y
echo ### Backing up directory...
%backupcmd% "C:\somedirectory" "%drive%\%folder%"
echo Backup Complete!
@pause
Questions:
1. When this batch file runs, it creates a folder with the Day, Day number, subfolder Month, subfolder year, then subfolder copy of "set drive". How can i make it so that the date is just one folder and a subfolder of what is being copied to it?
2. How can i modify this batch job to send a message to another pc via ip address to say "that the job has finish succesfully" if it completes; or that it failed if it returns error messages?
Thanks...
@echo off
:: variables
set drive=C:\Folder
set folder=%date%
set backupcmd=xcopy /s /c /d /e /h /i /r /k /y
echo ### Backing up directory...
%backupcmd% "C:\somedirectory" "%drive%\%folder%"
echo Backup Complete!
@pause
Questions:
1. When this batch file runs, it creates a folder with the Day, Day number, subfolder Month, subfolder year, then subfolder copy of "set drive". How can i make it so that the date is just one folder and a subfolder of what is being copied to it?
2. How can i modify this batch job to send a message to another pc via ip address to say "that the job has finish succesfully" if it completes; or that it failed if it returns error messages?
Thanks...