강좌 / 팁

윈 도 우 자료 mover(파일 첨부)

2020.01.16 17:15

레마클로 조회:2550 추천:20

 

 

set ATTR=%~a1

set DIRATTR=%ATTR:~0,1%

if /I "%DIRATTR%"=="d" goto :fold  

goto :file

 

위 배치파일은

드래그 앤 드롭한 개체가

파일인지, 폴더인지 구분해내는 역할입니다.

 

저는 배치파일의 고수도 아니고(문법도 그때그때 찾아보는 수준),

vbs의 고수도 아니고,

프로그래머도 아닙니다.

 

영세한(?) 컴퓨터가게 주인이었죠.

식당과 함께 투잡하려니 시간에 항상 쫓기는 경우가 많았습니다.

 

빠른 AS가 필요했고, 수명(?) 긴 OS를 깔아 주어야 했습니다.

 

그래서 탄생하게된게 "원클릭 테스트페이지 인쇄"였고

그후 "시간 절약 도구"들을 계속 개발 했던겁니다.

 

고수가 못되는 저는

<구글링+꼼수>로 시간을 절약하기 위해 시간을 투자했습니다.

 

그렇게 해서 나왔던 결과물 들을 전부는 아니어도 모두 다 공개 해 보려고 하는겁니다.

 

저는 꼼수쟁이에 불과 합니다.

업자 여러분들에게 도움이 되었으면 하는 바램입니다.

 

자료 mover = fastcopy + claunch + 파일,폴더 구분 배치파일

 

3가지를 조합(꼼수를 부려) 자료백업기를 만들었었습니다.

 

 

 

 

 

final-EFcopy.bat(더블클릭으로 실행하는 용도가 아닙니다)

 

스크립트 시작

 

@echo off

color F3

mode con cols=28 lines=3

 

SETLOCAL ENABLEEXTENSIONS

pushd "%~dp0"

 

if "%PROCESSOR_ARCHITECTURE%%PROCESSOR_ARCHITEW6432%" == "x86" (set FastCopy=FastCopy) else (set FastCopy=FastCopy64)

 

set "WWW=#_자료백업#"

if exist d:\%WWW% set mypath=d:&goto :daum

if exist e:\%WWW% set mypath=e:&goto :daum

if exist f:\%WWW% set mypath=f:&goto :daum

if exist g:\%WWW% set mypath=g:&goto :daum

if exist h:\%WWW% set mypath=h:&goto :daum

if exist i:\%WWW% set mypath=i:&goto :daum

if exist j:\%WWW% set mypath=j:&goto :daum

if exist k:\%WWW% set mypath=k:&goto :daum

if exist l:\%WWW% set mypath=l:&goto :daum

if exist m:\%WWW% set mypath=m:&goto :daum

if exist n:\%WWW% set mypath=n:&goto :daum

if exist o:\%WWW% set mypath=o:&goto :daum

if exist p:\%WWW% set mypath=p:&goto :daum

if exist q:\%WWW% set mypath=q:&goto :daum

if exist r:\%WWW% set mypath=r:&goto :daum

if exist s:\%WWW% set mypath=s:&goto :daum

if exist t:\%WWW% set mypath=t:&goto :daum

if exist v:\%WWW% set mypath=v:&goto :daum

if exist w:\%WWW% set mypath=w:&goto :daum

if exist z:\%WWW% set mypath=z:&goto :daum

 

:daum

 

set ATTR=%~a1

set DIRATTR=%ATTR:~0,1%

if /I "%DIRATTR%"=="d" goto :fold  

goto :file

 

 

:fold

start %fastcopy%.exe /cmd=move /auto_close /force_start /estimate %1\ /to="%mypath%\%WWW%\"

goto :fc

 

:file

start %fastcopy%.exe /cmd=move /auto_close /force_start /estimate %1 /to="%mypath%\%WWW%"

 

:fc

del FastCopy.ini

del FastCopy.log

 

:eof

 

스크립트 끝

 

 

폴더확인.bat

 

스크립트 시작

 

@echo off

color F3

mode con cols=28 lines=3

pushd "%~dp0"

 

:caum

set WWW=

set mypath=

 

set "WWW=#_자료백업#"

if exist d:\%WWW% set mypath=d:&goto :daum

if exist e:\%WWW% set mypath=e:&goto :daum

if exist f:\%WWW% set mypath=f:&goto :daum

if exist g:\%WWW% set mypath=g:&goto :daum

if exist h:\%WWW% set mypath=h:&goto :daum

if exist i:\%WWW% set mypath=i:&goto :daum

if exist j:\%WWW% set mypath=j:&goto :daum

if exist k:\%WWW% set mypath=k:&goto :daum

if exist l:\%WWW% set mypath=l:&goto :daum

if exist m:\%WWW% set mypath=m:&goto :daum

if exist n:\%WWW% set mypath=n:&goto :daum

if exist o:\%WWW% set mypath=o:&goto :daum

if exist p:\%WWW% set mypath=p:&goto :daum

if exist q:\%WWW% set mypath=q:&goto :daum

if exist r:\%WWW% set mypath=r:&goto :daum

if exist s:\%WWW% set mypath=s:&goto :daum

if exist t:\%WWW% set mypath=t:&goto :daum

if exist v:\%WWW% set mypath=v:&goto :daum

if exist w:\%WWW% set mypath=w:&goto :daum

if exist z:\%WWW% set mypath=z:&goto :daum

 

 

:daum

if exist "%mypath%\%WWW%" goto :far

cls

mkdir d:\%WWW%

goto :caum

 

:far

explorer "%mypath%\%WWW%"

 

:eof

 

스크립트 끝

 

 

먼저 "백업폴더 확인"을 눌러 확인 후 백업 작업을 하시기 바랍니다.(d:\#_자료백업#)

 

배치파일이 좀 조잡합니다.

fastcopy는 최신버전 아닙니다.

 

MV.png

 

 

 

 

 

 

 

 

 

 

 

번호 제목 글쓴이 조회 추천 등록일
[공지] 강좌 작성간 참고해주세요 gooddew - - -
4321 프린터 스풀 파일 삭제 명령 [1] 세이버 19047 0 09-17
4320 IE8 업데이트 후 IBK(기업은행)안될시.. [2] KOF 7561 0 09-18
4319 비스타 업데이트 실패시 업데이트 팁.. [2] 봄날의 꽃 8363 0 09-19
4318 윈도우 테마 폰트 수정 방법입니다. 리소스해커 사용. [1] 김기형 7765 0 09-27
4317 윈도우 테마 shell style 폰트 수정법입니다. 리소스해커 ... [1] 김기형 7076 0 09-27
4316 xp or vista 에서 안지워지는 서비스 항목 삭제법 강석규 6017 0 10-09
4315 윈도우Vista64에서 램디스크 사용할때 인터넷 느려지는 현... [2] 정건호 7614 0 10-12
4314 CTRL 키로 다중 파일 선택 시의 갑작스런 사본 파일 생성 문제 ASUS 6057 0 10-13
4313 자잘한 기본 Tip ASUS 9145 0 10-13
4312 Internet Explorer 32Bit로만 실행 하도록 하는 설정 방법 [6] ASUS 11382 0 10-13
4311 Server 2008 oem 인증 참조 [8] 훈장할배 15327 0 10-13
4310 바탕화면 [3] 세이버 6377 0 10-14
4309 Server 2008 VISTA처럼 사용하기 [11] ASUS 10945 0 10-14
4308 윈도 비스타 한글판에서 Segoe UI폰트 사용방법 [1] 모아이 8287 0 10-15
4307 Server 2008 64Bit의 부팅 시간 단축 [4] ASUS 10824 0 10-16
4306 기 타| ACPI Advanced Configuration & Power Interface(영문 ... [2] gooddew 6418 0 10-17
4305 응답없음 되어서 작업 관리자로 강제 종료하는 프로그램들... [9] ASUS 18950 0 10-19
4304 이제 겜도 풀옵주고 하자 [7] kk789 9045 0 10-21
4303 [TIP] vista x64 에서 캠타시아(camtasia) 실행시 ntdll.dl... [2] 최규락 7785 0 10-26
4302 기 타| 방화벽 우회해서 네이트온 메신져 로그인하기 [7] gooddew 10306 0 10-29
XE1.11.6 Layout1.4.8