@echo off
:favoritesbackup
echo.
echo.
echo. 즐겨찾기 백업 중...
echo.
echo.
FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v Favorites') DO SET Favorites=%%B
xcopy "%Favorites%" /A /E /H /I /K /F d:\temp\backup\Favorites
:desktopbackup
echo.
echo.
echo. 바탕화면 백업 중...
echo.
echo.
FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v Desktop') DO SET Desktop=%%B
xcopy "%Desktop%" /A /E /H /I /K /F "d:\temp\backup\바탕 화면"
:personalbackup
echo.
echo.
echo. 내문서 백업 중...
echo.
echo.
FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v Personal') DO SET Personal=%%B
xcopy "%Personal%" /A /E /H /I /K /F "d:\temp\backup\My Documents"
:outlookcheck
If Exist "%userprofile%\local settings\application data\microsoft\outlook" goto outlookbackup
goto npkicheck
:outlookbackup
echo.
echo.
echo. Outlook 백업 중...
echo.
echo.
xcopy "%userprofile%\local settings\application data\microsoft\outlook" /A /E /H /I /K /F d:\temp\backup\outlook
:npkicheck
If Exist "%programfiles%\NPKI" goto npkibackup
goto exit
:npkibackup
echo.
echo.
echo. 인터넷 인증서 백업 중...
echo.
echo.
xcopy "%programfiles%\NPKI" /A /E /H /I /K /F d:\temp\backup\NPKI
:exit
echo.
echo.
echo. 백업이 완료되었습니다.
echo.
echo.
pause
exit