강좌 / 팁

윈 도 우 자료 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 기 타| Activate by Phone gooddew 6463 0 12-27
4320 send feedback 버튼 없애기 [2] 김윈도 7740 0 12-27
4319 win7 Build.7000 2일사용기~ [1] 이상일 8346 0 01-01
4318 기 타| WIN7 Bootable 이미지 만들기 [2] gooddew 9084 0 01-02
4317 윈도우 비스타orXP용 드라이버 윈도우7에서 설치하기 [2] 먹는바보♪ 8785 0 01-07
4316 알툴바 및 알패스 기능 사용하기. 척살단 6779 0 01-08
4315 윈7 창간전환(윈도+탭, 알트+탭) 고정시켜서 보기 [8] 김정석 8610 0 01-10
4314 7에서 호스트파일 변경시 주의할것. [3] 루쿠아 8887 0 01-10
4313 quick launch 나오게 하는 방법입니다. (펌) [4] bluespy 8591 0 01-13
4312 7에서 체험점수 하드부분이 낮게 나올때.. [3] 조훈 7783 0 01-15
4311 기 타| How to Install and Enable DreamScene in Windows 7 gooddew 7571 0 01-16
4310 [팁] 7zip 64bit. 다이옥신 6011 0 01-19
4309 Windows 7 Beta 설치팁 [6] 랑카스터 9809 0 01-19
4308 windows installer가 중단되었다고 나올 때 [3] bluespy 6387 0 01-21
4307 윈도우7 미디어 센터 팁(추가) [2] 하이브 8155 0 01-22
4306 Window7 까탈리스트 설치 에러 해결 팁 [5] 김영준 12105 0 01-28
4305 Windows7 관리자버전 설치 이정빈 13740 0 01-31
4304 win 7 x64에 jre 6u12를 설치하는 방법 [3] bluespy 6908 0 02-05
4303 [팁]한/영 전환키 눌러도 한글전환안되는문제점 해결책! [1] 김종현 6909 0 02-24
4302 문제없는 Windows7 용 ATI 까다로운리스트 설치법 [2] 함정훈 7511 0 03-01
XE1.11.6 Layout1.4.8