The easiest way to make backups is by copying the files and/or folders ... what else is better than
a batch file who copy's certain files and/or folders to a place a networkshare or NAS?
Batch Backup
Additional resources or duplicate copies of data on different storage media for emergency purposes
What? How?
The Script
@ECHO OFF
COLOR 1F
for /F "tokens=1-4 delims=/ " %%i in ('date /t') do (
set Maand=%%k
set Dag=%%j
set Jaar=%%l
set Datum=%%k/%%j/%%l
)
Set Folder=\\Backup\My Files\%Jaar%-%Maand%-%Dag%
CLS
ECHO ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
ECHO º Backup Script v1.0 Kedero.com º
ECHO ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
@ping 127.0.0.1 -n 3 > NUL
MKDIR %Folder%
XCOPY "D:\My Files" %Folder% /E /C /F /Y /K /H
@ping 127.0.0.1 -n 3 > NUL
CLS
COLOR 1F
for /F "tokens=1-4 delims=/ " %%i in ('date /t') do (
set Maand=%%k
set Dag=%%j
set Jaar=%%l
set Datum=%%k/%%j/%%l
)
Set Folder=\\Backup\My Files\%Jaar%-%Maand%-%Dag%
CLS
ECHO ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
ECHO º Backup Script v1.0 Kedero.com º
ECHO ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
@ping 127.0.0.1 -n 3 > NUL
MKDIR %Folder%
XCOPY "D:\My Files" %Folder% /E /C /F /Y /K /H
@ping 127.0.0.1 -n 3 > NUL
CLS
Making backups the lazy way!
Next is scheduling this task ... and guess what nothing fits more than Windows Scheduler, you can configurate the batch file for execution every day, every week, ...
Next is scheduling this task ... and guess what nothing fits more than Windows Scheduler, you can configurate the batch file for execution every day, every week, ...
MS-DOS Commands
- MKDIR
Make Directory, create a new folder - XCOPY
Copy a whole directory structure to another location