일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
- JavaScript
- web.xml
- Eclipse
- 줄바꿈 문자
- context
- port
- Windows 10
- find
- ssh
- maVen
- grep
- netsh
- vscode
- import
- Quartz
- 네트워크
- IntelliJ
- profile
- Mac
- GIT
- plugin
- VirtualBox
- xargs
- bash
- resource
- Windows
- Source
- lsof
- tomcat
- 단축키
- Today
- Total
develog
[cmd] backup.bat 본문
@echo off
echo -----------------------------------------------------------
set date2=%date%
set time2=%time%
set time2=%time2:~0,2%%time2:~3,2%%time2:~6,2%
set now=%date2% %time2%
set dir=%now%
mkdir "%dir%"
set baseDir=C:\aa\bb\
set dstDir="C:\cc\dd ee\"
echo baseDir = %baseDir%
echo dstDir = %dstDir%
::--------------------------------------------------------------
call :copyAll %baseDir% %dstDir% %baseDir%\src\xx\sample1.txt
call :copyAll %baseDir% %dstDir% %baseDir%\src\yy\zz\sample2.txt
::--------------------------------------------------------------
echo -----------------------------------------------------------
goto :EOF
:copyAll
setlocal
set _baseDir=%1
set _dstDir=%2
set _srcFile=%3
set _path=%_srcFile:~45%
echo f | xcopy /e %_srcFile% %_dstDir%%_path%
endlocal
'OS & Shell > Windows' 카테고리의 다른 글
[cmd] 함수 선언, 실행 (0) | 2014.12.03 |
---|---|
[cmd] array loop (0) | 2014.12.03 |
[cmd] 폴더 copy (0) | 2014.12.03 |
[cmd] 주석 (0) | 2014.12.03 |
[cmd] 날짜, 시간으로 폴더 생성 (0) | 2014.12.03 |