Created
October 2, 2013 18:30
-
-
Save felipefernandes/6798335 to your computer and use it in GitHub Desktop.
Batch file de backup para windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ECHO off | |
set source="C:\Users\Public\Dropbox\Alunos 2013.2" | |
set destination="C:\Users\Public\webdesign_backup" | |
for /F "tokens=1-4 delims=/ " %%A in ('date/t') do ( | |
set DateDay=%%A | |
set DateMonth=%%B | |
set DateYear=%%C | |
) | |
set CurrentDate=%DateMonth%-%DateDay%-%DateYear% | |
if exist %destination% goto GO | |
:GO | |
cd %destination% | |
mkdir %CurrentDate% | |
xcopy %source% %destination%\%CurrentDate% /s/d/y/c/v/r | |
echo. | |
echo ** Backup completo! ** | |
echo. | |
echo Backup criado: %destination% \ %yyyymmdd1% | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment