매크로

조회 수 455 추천 0 댓글 3

 

안녕하세요

 

현재 bat파일로 백업 배치파일을 만들다 누락되는 파일이 있어

 

오토핫키로 백업파일을 만들어 보려고합니다

 

아래와 같이 filecopydir 폴더 전체 복사 명령어를 사용하였습니다

 

문제는 반응이 없습니다...

 

FileCopyDir, %userprofile%\Documents, d:\backup,1

 

실행창에서 %userprofile%\Documents 치면 내문서가 잘 열리는데요

 

filecopydir을 사용하면 복사진행이 안됩니다

 

FileCopyDir, C:\My Folder, C:\Copy of My Folder

예제글을 보았으나 내문서 지정이 안되어 위처럼 수정을 하였습니다

추가 수정으로는

FileCopyDir, C:\MyDocuments, d:\backup,1

FileCopyDir, C:\Documents, d:\backup,1

FileCopyDir, C:\%userprofile%\MyDocuments, d:\backup\,1

FileCopyDir, C:\%userprofile%\Documents, d:\backup\,1

FileCopyDir, C:\%a_workingdir%\MyDocuments, d:\backup,1

FileCopyDir, C:\%a_workingdir%\Documents, d:\backup,1

FileCopyDir, %a_workingdir%\MyDocuments, d:\backup,1

FileCopyDir, %a_workingdir%\Documents, d:\backup,1

등을 해보았지만 폴더 복사가 안되었습니다

 

아시는분 답변 부탁드립니다 ㅜ_ㅜ

 

 

;이하 소스

 

Gui, Add, Tab, x12 y10 w390 h350 , 체크|백 업
Gui, Tab, 백 업
Gui, Add, Button, x242 y50 w153 h60 , 백 업
Gui, Add, CheckBox, x20 y50 w60 h15 v내문서, 내문서
Gui, Add, CheckBox, x80 y50 w50 h15 v사진, 사진
Gui, Add, CheckBox, x130 y50 w60 h15 v동영상, 동영상
Gui, Add, CheckBox, x20 y90 w70 h15 v다운로드, 다운로드
Gui, Add, CheckBox, x90 y90 w70 h15 v즐겨찾기, 즐겨찾기
Gui, Add, CheckBox, x160 y90 w70 h15 v바탕화면, 바탕화면
Gui, Add, CheckBox, x190 y50 w50 h15 v음악, 음악
Gui, Add, Button, x242 y110 w153 h30 , 설정저장

 

Gui, Tab, 체크
Path:=A_ScriptDir
Gui, Add, Button, x250 y319 w70 h22 gFolder, 파일찾기
Gui, Add, DropDownList, x20 y320 w100 h400 vlist1, 코드|
Gui, Add, DropDownList, x125 y320 w55 h400 vlist2, 날짜|
Gui, Add, DropDownList, x185 y320 w60 h400 vlist3, 대기분||20분
Gui, Add, Button, x325 y319 w70 h22 ,
Gui, Add, GroupBox, x15 y40 w225 h270 , [Message 로그기록]
Gui, Add, listBox, x17 y58 w218 h255 vnotice_list, Message 기록이 List됩니다
Gui, Font, S35 CDefault Bold, Verdana
Gui, Add, Button, x242 y58 w153 h80 , 시 작
Gui, Add, Button, x242 y140 w153 h80 , 종 료
Gui, Add, Button, x242 y222 w153 h80 , 리 셋
Gui, Show, x391 y105 h269 w462,  PROGRAM

 

; Generated using SmartGUI Creator 4.0
Gui, Show, x356 y136 h372 w416,


#NoEnv
#SingleInstance force ; 스크립트를 동시에 한개만 실행
#Persistent ; 핫키가 없더라도 스크립트 실행을 유지
SetBatchLines,-1  ; 라인간 딜레이를 없애서 속도 상승
coordmode, pixel, screen
CoordMode, ToolTip, Screen
SetWorkingDir %A_ScriptDir%
SetWorkingDir %A_WorkingDir%
SetTitleMatchMode, 2
WinGetPos, winX, winY, winW, winH, %TILE%
WinActivate, %ActiveID%
DebugMode := 1
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.

gui, submit, nohide 
IniRead,내문서, option.ini, 내문서, 내문서
guicontrol,,내문서,%내문서%
gui, submit, nohide 
IniRead,사진, option.ini, 사진, 사진
guicontrol,,사진,%사진%
gui, submit, nohide 
IniRead,동영상, option.ini, 동영상, 동영상
guicontrol,,동영상,%동영상%
gui, submit, nohide 
IniRead,다운로드, option.ini, 다운로드, 다운로드
guicontrol,,다운로드,%다운로드%
gui, submit, nohide 
IniRead,즐겨찾기, option.ini, 즐겨찾기, 즐겨찾기
guicontrol,,즐겨찾기,%즐겨찾기%
gui, submit, nohide 
IniRead,바탕화면, option.ini, 바탕화면, 바탕화면
guicontrol,,바탕화면,%바탕화면%
gui, submit, nohide 
IniRead,음악, option.ini, 음악, 음악
guicontrol,,음악,%음악%

 


return


Folder:
FileSelectFile,newPath,%Path%,*.xls
Path:=NewPath
GuiControl,,Path,%Path%
return

 

Button백업:
 
  Gui, Submit, Nohide

FileCreateDir, d:\backup

 formattime , nowtime,,MM-dd HH:mm:ss
  guicontrol,,notice_2, %message_2%
  listMessage =%nowtime% 백업 준비.. %message_2%|%listMessage%
  guicontrol,,notice_list, |%listMessage%


if 내문서=0
{
sleep, 100
}

if 내문서=1
{
 
     FileCopyDir, %userprofile%\Documents, d:\backup,1
    
}

 
  formattime , nowtime,,MM-dd HH:mm:ss
  guicontrol,,notice_2, %message_2%
  listMessage =%nowtime% 백업 준비.. %message_2%|%listMessage%
  guicontrol,,notice_list, |%listMessage%
  return


  • T7GG 2016.09.04 17:15

    6시간만에 해결 완료

    edit을 구이에 추가하여 변수로 지정하여 계정을 입력 및 ini에 저장하여 불러오는 식으로 해결봤습니다..

     

    이제 문제는 프로그레스바 네요ㅎㅎ

     

    c:\user\%계정%\내문서

  • 제발등업좀2 2016.09.06 21:35

    안녕하세요 올만에 뵙네요 ㅋㅋㅋ 잘지내시죠~

  • T7GG 2016.09.10 16:06
    저야 잘지내죠 ㅎㅎ 명절 잘 보내시고요~

    요즘은 게임보단 업무용으로 이용하려고 머리 굴리고 있어요 ㅋㅋ

List of Articles
분류 제목 글쓴이 최근변경 추천
질문 오늘 하루 열심히 해보고 비활성 질문하나 드립니다. 5 갈형 2016.09.05 0/0
질문 filecopydir 사용법 문의 글입니다 3 T7GG 2016.09.10 0/0
질문 매크로 프로그램들 장단점 3 졸려어 2016.09.04 0/0
질문 오핫 이미지서치에 관한 질문입니다 1 지니블렉션 2016.09.03 0/0
질문 메이플스토리 비활성 관련 질문 드립니다 7 Guri 2017.01.21 0/0
질문 대기서치 질문드립니다 2 PlusK 2016.09.01 0/0
질문 GDIP trans 기능 예제 힌트좀 주실수있으신가요? 35 캔디염 2016.09.18 0/0
질문 ImageSearch.ahk 파일 공유좀 해주세요. 2 별이죽다 2016.09.04 0/0
질문 리니지 매크로 제작 가능하신분 있나요? 1 뉴화청 2022.09.07 0/0
질문 비활성 이미지 서치에서 반복작업 질문 드립니다 2 배우고싶다 2016.09.07 0/0
질문 무한루프 이미지서치 질문드립니다. 5 아라아리 2016.08.31 0/0
질문 오토핫키 시작하려면 뭐부터해야되나요 3 너만하냐 2016.09.01 0/0
질문 녹스 비활성 질문입니다 소스좀 봐주세요 2 잘크 2016.08.30 0/0
질문 숫자 인식 매크로관련 질문 3 김수호 2016.10.21 0/0
질문 오토핫키와 같이 스크립트 기반이면서 3 테일스탈 2016.10.20 0/0
질문 오토핫키 FPS게임 마우스질문 1 dwodqw 2018.02.03 0/0
자유 이제 조만간 opengl의 캡쳐 장벽도 깨지겠네요. 크루세이덩 2016.08.27 0/0
질문 녹스 비활성 클릭 질문입니다. 2 지니블렉션 2016.08.26 0/0
질문 비활성 클릭에서 막혔습니다 4 복권상인 2016.08.29 0/0
질문 OCR 숫자 인식 관련해서 질문 드립니다. 3 247천사잉 2016.09.06 0/0
Board Pagination Prev 1 ... 108109110111112113114115116 ... 209 Next
/ 209

전체 최신 인기글

전체 주간 인기글