블로그 이미지
Flying Mr.Cheon youGom

Recent Comment»

Recent Post»

Recent Trackback»

« 2024/5 »
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

 
 

Disk Genius 디스크 복구 프로그램

파워유저로 가는길 | 2011. 11. 16. 22:26 | Posted by youGom

http://www.partitionguru.com/

외장하드 복구를 하기 위해, 검색하던 중 위 디스크 복구 프로그램이 가장 좋다 하여, 검색했다.
프리 버젼을 받았다.

:

Shift + a 누를 때 : Send, {SHIFTDOWN} a {SHIFTUP}


 
아래와 같이 설명서가 적혀 있습니다. ( 번역해놓음  ^^; )



To hold down or release a key: Enclose in braces the name of the key followed by the word Down or Up. For example:
키를 누르고 있거나 풀어줄 때 :  키 이름에 Down 또는 Up 를 넣습니다.

Send {b down}{b up}
Send {TAB down}{TAB up}
Send {Up down}  ; Press down the up-arrow key. 방향키 ( 업-다운 )을 누르게 됨.
Sleep 1000  ; Keep it down for one second. 다운 상태 1 초간 유지
Send {Up up} ; Release the up-arrow key.  Up 방향키를 풀어줍니다.

 
:

[AutoHotKey] 키보드 Key 리스트

파워유저로 가는길 | 2011. 10. 14. 00:31 | Posted by youGom

사용방법 send,  {Enter} second line.

 Space - the spacebar
Tab
Enter (or Return)
Escape (or Esc)
Backspace (or BS)

Delete (or Del)
Insert (or Ins)
Home
End
PgUp
PgDn
Up
Down
Left
Right

ScrollLock
CapsLock
NumLock

Numlock ON Numlock OFF
Numpad0 NumpadIns
Numpad1 NumpadEnd
Numpad2 NumpadDown
Numpad3 NumpadPgDn
Numpad4 NumpadLeft
Numpad5 NumpadClear
Numpad6 NumpadRight
Numpad7 NumpadHome
Numpad8 NumpadUp
Numpad9 NumpadPgUp
NumpadDot (.) NumpadDel
NumpadDiv (/) NumpadDiv (/)
NumpadMult (*) NumpadMult (*)
NumpadAdd (+) NumpadAdd (+)
NumpadSub (-) NumpadSub (-)
NumpadEnter NumpadEnter


F1 through F24 - The 12 or more function keys at the top of most keyboards.

AppsKey - this is the key that invokes the right-click context menu.

LWin - the left windows key
RWin - the right windows key. Note: unlike Control/Alt/Shift, there is no generic/neutral "Win" key because the OS does not support it.
Control (or Ctrl)
Alt
Shift
Note: The hotkeys Shift::, Alt::, and Control:: fire upon release of the key unless they have the tilde prefix such as ~Alt::. By contrast, a specific left or right hotkey such as LAlt:: fires upon press-down.

Note: For the most part, these next 6 keys are not supported by Windows 95/98/Me. Use the above instead:
LControl (or LCtrl) - the left control key
RControl (or RCtrl) - the right control key
LShift - the left shift key
RShift - the right shift key
LAlt - the left Alt key
RAlt - Note: If your keyboard layout has AltGr instead of RAlt, you can probably use it as a hotkey prefix via <^>! as described here. In addition, "LControl & RAlt::" would make AltGr itself into a hotkey.

PrintScreen
CtrlBreak
Pause
Break -- Since this is synonymous with Pause, use ^CtrlBreak in hotkeys instead of ^Pause or ^Break.

Help - this probably doesn't exist on most keyboards. It's usually not the same as F1.
Sleep - note that the sleep key on some keyboards might not work with this.

The following exist only on Multimedia or Internet keyboards that have extra buttons or keys:
Browser_Back
Browser_Forward
Browser_Refresh
Browser_Stop
Browser_Search
Browser_Favorites
Browser_Home
Volume_Mute
Volume_Down
Volume_Up
Media_Next
Media_Prev
Media_Stop
Media_Play_Pause
Launch_Mail
Launch_Media
Launch_App1
Launch_App2

SCnnn (where nnn is the scan code of a key) - Recognizes unusual keys not mentioned above. See Special Keys for details.

VKnn (where nn is the hexadecimal virtual key code of a key) - This rarely-used method also prevents certain types of hotkeys from requiring the keyboard hook. For example, the following hotkey does not use the keyboard hook, but as a side-effect it is triggered by pressing either Home or NumpadHome: ^VK24::MsgBox You pressed Home or NumpadHome while holding down Control. See Special Keys for more information

:

하루 시간에 맞추어, 모니터 색온도 자동 조절해주는 프로그램
눈의 피로도 조절에 도움이 많이 됩니다.



http://stereopsis.com/flux/

:

[AutoHotKey] 기본 사용법

파워유저로 가는길 | 2011. 8. 16. 11:35 | Posted by youGom


--------------------------------------------------------------------------

      Send, {}  {}안의 글자를 누릅니다.

      Sleep, n  n만큼 쉽니다..  1000 = 1초

      MouseClick, Left or Right  마우스 왼쪽 or 오른쪽 클릭

      Return  되돌아가다 스크립트 마지막에 씁니다.

      Pause 중지 / 재시작 (Return 아래에 써주세요)

      Exitapp 오토핫키 종료

 

--------------------------------------------------------------------------

     

    F1  시작

    F2  재시작

    F3  종료

 

--------------------------------------------------------------------------

F1::

Loop

 

{

Send, dkssudgktpdy

Sleep, 300

Send, {F2}

Sleep, 300

}

Return

F2::Pause

F3::Exitapp

 

--------------------------------------------------------------------------

간단합니다.. 마지막에 Send, {F2} 를 쓴 것은 한번만 루프하려고 한거구요..

F2를 또 누르시면 도 칩니다. 참 그리고 '한/영' 키는 '한글'로 되어있어야 되구요.

Ctrl+a 를 누르면 시작하게 하는 방법은 F1을 ^a 로 바꾸어 주시면 됩니다...

^이 CTRL 입니다...

-------------------------------------------------------------------------- 

 

:

오토핫키 명령어 리스트

파워유저로 가는길 | 2011. 8. 16. 11:05 | Posted by youGom
오토핫키 명령어 리스트
Autohotkey Command List

오토핫키는 매크로 영역을 넘어서 스크립트언어라고 말할정도로 세계적인 호응을 얻고 있다.
오토잇과 더불어 매크로 분야 뛰어난 편리성을 자랑하고있는 가운데 최근들어 버전업 되면서 오토핫키가 단연 우수하다는 평을 받고 있다.
사실 유료버전보다 무료버전이 좋은것이 많지만 매크로 소프트웨어도 인터페이스만 요란한것과는 대조적으로 오토핫키는 어쩌면 허접하게 보이는 인터페이스와는 다르게 그 내용은 우수한것이 사실이다.
아래에 오토핫키를 더욱 빛내주는 강력한 커맨드리스트를 올려봅니다.
 
 
Command Description
{ ... } A pair of braces denotes a block. Blocks are typically used with functions, Else, Loop, While-loop, and IF-commands.
AutoTrim Determines whether "Var1 = %Var2%" statements omit spaces and tabs from the beginning and end of Var2.
BlockInput Disables or enables the user's ability to interact with the computer via keyboard and mouse.
Break Exits (terminates) a loop. Valid inside any kind of loop.
Click Clicks a mouse button at the specified coordinates. It can also hold down a mouse button, turn the mouse wheel, or move the mouse.
ClipWait Waits until the clipboard contains data.
Continue Skips the rest of the current loop iteration and begins a new one. Valid inside any kind of loop.
Control Makes a variety of changes to a control.
ControlClick Sends a mouse button or mouse wheel event to a control.
ControlFocus Sets input focus to a given control on a window.
ControlGet Retrieves various types of information about a control.
ControlGetFocus Retrieves which control of the target window has input focus, if any.
ControlGetPos Retrieves the position and size of a control.
ControlGetText Retrieves text from a control.
ControlMove Moves or resizes a control.
ControlSend / ControlSendRaw Sends simulated keystrokes to a window or control.
ControlSetText Changes the text of a control.
CoordMode Sets coordinate mode for various commands to be relative to either the active window or the screen.
Critical Prevents the current thread from being interrupted by other threads.
DetectHiddenText Determines whether invisible text in a window is "seen" for the purpose of finding the window. This affects commands such as IfWinExist and WinActivate.
DetectHiddenWindows Determines whether invisible windows are "seen" by the script.
DllCall() Calls a function inside a DLL, such as a standard Windows API function.
Drive Ejects/retracts the tray in a CD or DVD drive, or sets a drive's volume label.
DriveGet Retrieves various types of information about the computer's drive(s).
DriveSpaceFree Retrieves the free disk space of a drive, in Megabytes.
Edit Opens the current script for editing in the associated editor.
Else Specifies the command(s) to perform if an IF-statement evaluates to FALSE. When more than one command is present, enclose them in a block (braces).
EnvAdd Sets a variable to the sum of itself plus the given value (can also add or subtract time from a date-time value). Synonymous with: var += value
EnvDiv Sets a variable to itself divided by the given value. Synonymous with: var /= value
EnvGet Retrieves an environment variable.
EnvMult Sets a variable to itself times the given value. Synonymous with: var *= value
EnvSet Writes a value to a variable contained in the environment.
EnvSub Sets a variable to itself minus the given value (can also compare date-time values). Synonymous with: var -= value
EnvUpdate Notifies the OS and all running applications that environment variable(s) have changed.
Exit Exits the current thread or (if the script is not persistent and contains no hotkeys) the entire script.
ExitApp Terminates the script unconditionally.
FileAppend Writes text to the end of a file (first creating the file, if necessary).
FileCopy Copies one or more files.
FileCopyDir Copies a folder along with all its sub-folders and files (similar to xcopy).
FileCreateDir Creates a folder.
FileCreateShortcut Creates a shortcut (.lnk) file.
FileDelete Deletes one or more files.
FileInstall Includes the specified file inside the compiled version of the script.
FileGetAttrib Reports whether a file or folder is read-only, hidden, etc.
FileGetShortcut Retrieves information about a shortcut (.lnk) file, such as its target file.
FileGetSize Retrieves the size of a file.
FileGetTime Retrieves the datetime stamp of a file or folder.
FileGetVersion Retrieves the version of a file.
FileMove Moves or renames one or more files.
FileMoveDir Moves a folder along with all its sub-folders and files. It can also rename a folder.
FileRead Reads a file's contents into a variable.
FileReadLine Reads the specified line from a file and stores the text in a variable.
FileRecycle Sends a file or directory to the recycle bin, if possible.
FileRecycleEmpty Empties the recycle bin.
FileRemoveDir Deletes a folder.
FileSelectFile Displays a standard dialog that allows the user to open or save file(s).
FileSelectFolder

Displays a standard dialog that allows the user to select a folder.

FileSetAttrib Changes the attributes of one or more files or folders. Wildcards are supported.
FileSetTime Changes the datetime stamp of one or more files or folders. Wildcards are supported.
FormatTime Transforms a YYYYMMDDHH24MISS timestamp into the specified date/time format.
GetKeyState Checks if a keyboard key or mouse/joystick button is down or up. Also retrieves joystick status.
Gosub Jumps to the specified label and continues execution until Return is encountered.
Goto Jumps to the specified label and continues execution.
GroupActivate Activates the next window in a window group that was defined with GroupAdd.
GroupAdd Adds a window specification to a window group, creating the group if necessary.
GroupClose Closes the active window if it was just activated by GroupActivate or GroupDeactivate. It then activates the next window in the series. It can also close all windows in a group.
GroupDeactivate Similar to GroupActivate except activates the next window not in the group.
GUI Creates and manages windows and controls. Such windows can be used as data entry forms or custom user interfaces.
GuiControl Makes a variety of changes to a control in a GUI window.
GuiControlGet Retrieves various types of information about a control in a GUI window.
HideAutoItWin, On|Off [Obsolete -- the following is equivalent: Menu, tray, NoIcon|Icon]
Hotkey Creates, modifies, enables, or disables a hotkey while the script is running.
if Specifies the command(s) to perform if the comparison of a variable to a value evalutes to TRUE. When more than one command is present, enclose them in a block (braces).
if (expression) Specifies the command(s) to perform if an expression evaluates to TRUE.
If var [not] between Checks whether a variable's contents are numerically or alphabetically between two values (inclusive).
If var [not] in/contains MatchList Checks whether a variable's contents match one of the items in a list.
If var is [not] type
Checks whether a variable's contents are numeric, uppercase, etc.
IfEqual/IfNotEqual
Compares a variable to a value for equality. Synonymous with: if var = value | if var <> value
IfExist / FileExist()
Checks for the existence of a file or folder.
IfGreater/IfGreaterOrEqual
Compares a variable to a value. Synonymous with: if var > value | if var >= value
IfInString / InStr()
Checks if a variable contains the specified string.
IfLess/IfLessOrEqual
Compares a variable to a value. Synonymous with: if var < value | if var <= value
IfMsgBox
Checks which button was pushed by the user during the most recent MsgBox command.
IfWinActive / IfWinNotActive
Checks if the specified window exists and is currently active (foremost).
IfWinExist / IfWinNotExist
Checks if the specified window exists.
ImageSearch Searches a region of the screen for an image.
IniDelete Deletes a value from a standard format .ini file.
IniRead Reads a value from a standard format .ini file.
IniWrite Writes a value to a standard format .ini file.
Input Waits for the user to type a string (not supported on Windows 9x: it does nothing).
InputBox Displays an input box to ask the user to enter a string.
KeyHistory Displays script info and a history of the most recent keystrokes and mouse clicks.
KeyWait Waits for a key or mouse/joystick button to be released or pressed down.
LeftClick [Obsolete -- use Click for greater flexibility]
LeftClickDrag [Obsolete -- use MouseClickDrag for greater flexibility]
ListHotkeys Displays the hotkeys in use by the current script, whether their subroutines are currently running, and whether or not they use the keyboard or mouse hook.
ListLines Displays the script lines most recently executed.
ListVars Displays the script's variables: their names and current contents.
Loop (normal) Perform a series of commands repeatedly: either the specified number of times or until break is encountered.
Loop (files & folders) Retrieves the specified files or folders, one at a time.
Loop (parse a string) Retrieves substrings (fields) from a string, one at a time.
Loop (read file contents) Retrieves the lines in a text file, one at a time (performs better than FileReadLine).
Loop (registry) Retrieves the contents of the specified registry subkey, one item at a time.
Menu Creates, deletes, modifies and displays menus and menu items. Changes the tray icon and its tooltip. Controls whether the main window of a compiled script can be opened.
MouseClick Clicks or holds down a mouse button, or turns the mouse wheel. NOTE: The Click command is generally more flexible and easier to use.
MouseClickDrag Clicks and holds the specified mouse button, moves the mouse to the destination coordinates, then releases the button.
MouseGetPos Retrieves the current position of the mouse cursor, and optionally which window and control it is hovering over.
MouseMove Moves the mouse cursor.
MsgBox Displays the specified text in a small window containing one or more buttons (such as Yes and No).
OnExit Specifies a subroutine to run automatically when the script exits.
OnMessage() Specifies a function to call automatically when the script receives the specified message.
OutputDebug Sends a string to the debugger (if any) for display.
Pause Pauses the script's current thread.
PixelGetColor Retrieves the color of the pixel at the specified x,y coordinates.
PixelSearch Searches a region of the screen for a pixel of the specified color.
PostMessage Places a message in the message queue of a window or control.
Process Performs one of the following operations on a process: checks if it exists; changes its priority; closes it; waits for it to close.
Progress Creates or updates a window containing a progress bar.
Random Generates a pseudo-random number.
RegExMatch() Determines whether a string contains a pattern (regular expression).
RegExReplace() Replaces occurrences of a pattern (regular expression) inside a string.
RegDelete Deletes a subkey or value from the registry.
RegRead Reads a value from the registry.
RegWrite Writes a value to the registry.
RegisterCallback() Creates a machine-code address that when called, redirects the call to a function in the script.
Reload Replaces the currently running instance of the script with a new one.
Repeat…EndRepeat
[Obsolete -- use Loop for greater flexibility]
Return Returns from a subroutine to which execution had previously jumped via function-call, Gosub, Hotkey activation, GroupActivate, or other means.
RightClick [Obsolete -- use Click for greater flexibility]
RightClickDrag [Obsolete -- use MouseClickDrag for greater flexibility]
Run Runs an external program.
RunAs Specifies a set of user credentials to use for all subsequent uses of Run and RunWait. Requires Windows 2000/XP or later.
RunWait Runs an external program and waits until it finishes.
Send / SendRaw / SendInput / SendPlay Sends simulated keystrokes and mouse clicks to the active window.
SendMessage Sends a message to a window or control and waits for acknowledgement.
SendMode Makes Send synonymous with SendInput or SendPlay rather than the default (SendEvent). Also makes Click and MouseMove/Click/Drag use the specified method.
SetBatchLines Determines how fast a script will run (affects CPU utilization).
SetCapslockState Sets the state of the Capslock key. Can also force the key to stay on or off.
SetControlDelay Sets the delay that will occur after each control-modifying command.
SetDefaultMouseSpeed Sets the mouse speed that will be used if unspecified in Click and MouseMove/Click/Drag.
SetEnv (Var = Value) Assigns the specified value to a variable.
SetFormat Sets the format of integers and floating point numbers generated by math operations.
SetKeyDelay Sets the delay that will occur after each keystroke sent by Send or ControlSend.
SetMouseDelay Sets the delay that will occur after each mouse movement or click.
SetNumlockState Sets the state of the Numlock key. Can also force the key to stay on or off.
SetScrollLockState Sets the state of the Scrolllock key. Can also force the key to stay on or off.
SetStoreCapslockMode
Whether to restore the state of CapsLock after a Send.
SetTimer Causes a subroutine to be launched automatically and repeatedly at a specified time interval.
SetTitleMatchMode Sets the matching behavior of the WinTitle parameter in commands such as WinWait.
SetWinDelay Sets the delay that will occur after each windowing command, such as WinActivate.
SetWorkingDir Changes the script's current working directory.
Shutdown Shuts down, restarts, or logs off the system.
Sleep Waits the specified amount of time before continuing.
Sort Arranges a variable's contents in alphabetical, numerical, or random order (optionally removing duplicates).
SoundBeep Emits a tone from the PC speaker.
SoundGet Retrieves various settings from a sound device (master mute, master volume, etc.)
SoundGetWaveVolume Retrieves the wave output volume from a sound device.
SoundPlay Plays a sound, video, or other supported file type.
SoundSet Changes various settings of a sound device (master mute, master volume, etc.)
SoundSetWaveVolume Changes the wave output volume for a sound device.
SplashImage Creates or updates a window containing a JPG, GIF, or BMP image.
SplashTextOn Creates a customizable text popup window.
SplashTextOff Closes the above window.
SplitPath Separates a file name or URL into its name, directory, extension, and drive.
StatusBarGetText Retrieves the text from a standard status bar control.
StatusBarWait Waits until a window's status bar contains the specified string.
StringCaseSense Determines whether string comparisons are case sensitive (default is "not case sensitive").
StringGetPos / InStr() Retrieves the position of the specified substring within a string.
StringLeft Retrieves a number of characters from the left-hand side of a string.
StringLen / StrLen() Retrieves the count of how many characters are in a string.
StringLower Converts a string to lowercase.
StringMid / SubStr() Retrieves one or more characters from the specified position in a string.
StringReplace Replaces the specified substring with a new string.
StringRight Retrieves a number of characters from the right-hand side of a string.
StringSplit Separates a string into an array of substrings using the specified delimiters.
StringTrimLeft Removes a number of characters from the left-hand side of a string.
StringTrimRight Removes a number of characters from the right-hand side of a string.
StringUpper Converts a string to uppercase.
Suspend Disables or enables all or selected hotkeys and hotstrings.
SysGet Retrieves screen resolution, multi-monitor info, dimensions of system objects, and other system properties.
Thread Sets the priority or interruptibility of threads. It can also temporarily disable all timers.
ToolTip Creates an always-on-top window anywhere on the screen.
Transform Performs miscellaneous math functions, bitwise operations, and tasks such as ASCII/Unicode conversion.
TrayTip Creates a balloon message window near the tray icon. Requires Windows 2000/XP or later.
UrlDownloadToFile Downloads a file from the Internet.
Var = value Assigns the specified value to a variable.
Var := expression Evaluates an expression and stores the result in a variable.
VarSetCapacity() Enlarges a variable's holding capacity or frees its memory. Normally, this is necessary only for unusual circumstances such as DllCall.
While-loop Performs a series of commands repeatedly until the specified expression evaluates to false.
WinActivate Activates the specified window (makes it foremost).
WinActivateBottom Same as WinActivate except that it activates the bottommost (least recently active) matching window rather than the topmost.
WinClose Closes the specified window.
WinGetActiveStats Combines the functions of WinGetActiveTitle and WinGetPos into one command.
WinGetActiveTitle Retrieves the title of the active window.
WinGetClass Retrieves the specified window's class name.
WinGet Retrieves the specified window's unique ID, process ID, process name, or a list of its controls. It can also retrieve a list of all windows matching the specified criteria.
WinGetPos Retrieves the position and size of the specified window.
WinGetText Retrieves the text from the specified window.
WinGetTitle Retrieves the title of the specified window.
WinHide Hides the specified window.
WinKill Forces the specified window to close.
WinMaximize Enlarges the specified window to its maximum size.
WinMenuSelectItem Invokes a menu item from the menu bar of the specified window.
WinMinimize Collapses the specified window into a button on the task bar.
WinMinimizeAll Minimizes all windows.
WinMinimizeAllUndo Reverses the effect of a previous WinMinimizeAll.
WinMove Changes the position and/or size of the specified window.
WinRestore Unminimizes or unmaximizes the specified window if it is minimized or maximized.
WinSet Makes a variety of changes to the specified window, such as "always on top" and transparency.
WinSetTitle Changes the title of the specified window.
WinShow Unhides the specified window.
WinWait Waits until the specified window exists.
WinWaitActive Waits until the specified window is active.
WinWaitClose Waits until the specified window does not exist.
WinWaitNotActive Waits until the specified window is not active.
#AllowSameLineComments Only for AutoIt v2 (.aut) scripts: Allows a comment to appear on the same line as a command.
#ClipboardTimeout Changes how long the script keeps trying to access the clipboard when the first attempt fails.
#CommentFlag Changes the script's comment symbol from semicolon to some other string.
#ErrorStdOut Sends any syntax error that prevents a script from launching to stdout rather than displaying a dialog.
#EscapeChar Changes the script's escape character (for example: backslash vs. accent).
#HotkeyInterval Along with #MaxHotkeysPerInterval, specifies the rate of hotkey activations beyond which a warning dialog will be displayed.
#HotkeyModifierTimeout Affects the behavior of hotkey modifiers: CTRL, ALT, WIN, and SHIFT.
#Hotstring Changes hotstring options or ending characters.
#IfWinActive / #IfWinExist Creates context-sensitive hotkeys and hotstrings. Such hotkeys perform a different action (or none at all) depending on the type of window that is active or exists.
#Include Causes the script to behave as though the specified file's contents are present at this exact position.
#InstallKeybdHook Forces the unconditional installation of the keyboard hook.
#InstallMouseHook Forces the unconditional installation of the mouse hook.
#KeyHistory Sets the maximum number of keyboard and mouse events displayed by the KeyHistory window. You can set it to 0 to disable key history.
#MaxHotkeysPerInterval Along with #HotkeyInterval, specifies the rate of hotkey activations beyond which a warning dialog will be displayed.
#MaxMem Sets the maximum capacity of each variable to the specified number of megabytes.
#MaxThreads Sets the maximum number of simultaneous threads.
#MaxThreadsBuffer Causes some or all hotkeys to buffer rather than ignore keypresses when their #MaxThreadsPerHotkey limit has been reached.
#MaxThreadsPerHotkey Sets the maximum number of simultaneous threads per hotkey or hotstring.
#NoEnv Avoids checking empty variables to see if they are environment variables (recommended for all new scripts).
#NoTrayIcon Disables the showing of a tray icon.
#Persistent Keeps a script permanently running (that is, until the user closes it or ExitApp is encountered).
#SingleInstance Determines whether a script is allowed to run again when it is already running.
#UseHook Forces the use of the hook to implement all or some keyboard hotkeys.
#WinActivateForce Skips the gentle method of activating a window and goes straight to the forceful method.


:
위 글대로 했을 경우, 약간의 버그가 있었다.
버그 내용은, 일부 내용이 업데이트 되지 않는 것이었다.

코드 두줄 첨부해 주면 위 버그가 사라진다.

( 사실... 첨에 할 때, 그냥 재귀로 했으면 문제 없었을건데.. ㅋㅋㅋㅋ 재귀로 다시 만들기 귀찮아서... 나중에 필요할 때, 재귀방식으로 만들려고 한다 -0-;; )


[ chkcopy ]
@echo off

if NOT EXIST %1 ( 
ECHO PATH ERROR ARG1
GOTO END 
)
if NOT EXIST %2 ( 
ECHO PATH ERROR ARG2 
GOTO END 
)

set run_copy=__todst
set chk_copy=xcopy /s /f /u /y


call %run_copy% %1 %2

FOR /D %%R IN (%1\*) DO ( 
call %run_copy% %%R %2
FOR /D %%S IN (%%R\*) DO ( 
call %run_copy% %%S %2
FOR /D %%I IN (%%S\*) DO ( 
call %run_copy% %%I %2
FOR /D %%J IN (%%I\*) DO ( 
call %run_copy% %%J %2
FOR /D %%K IN (%%J\*) DO ( 
call %run_copy% %%K %2
)
)
)
)
)

set run_copy=
set chk_copy=

:END

@echo on

 

[ __todst ]

rem echo src: %1
rem echo dst: %2
call %chk_copy% %1 %2

FOR /D %%R IN (%2\*) DO ( 
rem echo src: %1
rem echo dst: %%R 
call %chk_copy% %1 %%R
FOR /D %%S IN (%%R\*) DO ( 
rem echo src: %1
rem echo dst: %%S
call %chk_copy% %1 %%S
FOR /D %%I IN (%%S\*) DO ( 
rem echo src: %1
rem echo dst: %%I
call %chk_copy% %1 %%I
FOR /D %%J IN (%%I\*) DO ( 
rem echo src: %1
rem echo dst: %%J
call %chk_copy% %1 %%J
FOR /D %%K IN (%%J\*) DO ( 
rem echo src: %1
rem echo dst: %%K
call %chk_copy% %1 %%K
)
)
)
)
)



  
:
테스트 코드
@echo off
xcopy * ..\dest /s /f /d /u /y
xcopy * ..\dest\a /s /f /d /u /y
xcopy * ..\dest\b /s /f /d /u /y
@echo on

* : 복사할 src
..\dest... : 복사 대상 폴더
/s /f /d /u /y : 옵션


/D:m-d-y 지정된 날짜 이후에 바뀐 파일만 복사합니다날짜가 지정되지 않으면, 대상 파일보다 새로운 원본 파일만 복사합니다.
/S 비어 있지 않은 디렉터리와 하위 디렉터리를 복사합니다. 
/F 복사하는 동안 원본과 대상 파일의 전체 경로 를 표시합니다. 

/U 대상에 이미 있는 파일을 업데이트합니다.

/Y 이미 있는 대상 파일을 덮어쓸지를 확인하기 위해 묻는 것을 금합니다.

이상!! ㅋㅋㅋㅋ

굳이 어플 안만들어도 되겠네 ㅋㅋㅋㅋ 아놔 괜히 2010 스튜디오 깔았네 ㅋㅋ 
( 설치 하는 동안 배치 파일 테스트해봤는데 되버리눼 ㅋㅋㅋ )
 



 

final!!!!!
[ 재귀호출방식으로 할까 했으나... 나중에 더 심화배치가 필요하면 그때 하지머.. 지금은 이대로도 가능하니까... 오늘은여기까지~ ㅋㅋㅋㅋ ]

사용은... chkcopy src dst 로 하면 된다~

[ chkcopy ]
@echo off

if NOT EXIST %1 ( 
ECHO PATH ERROR ARG1
GOTO END 
)
if NOT EXIST %2 ( 
ECHO PATH ERROR ARG2 
GOTO END 
)

set run_copy=__todst

set chk_copy=xcopy /s /f /u /y 


FOR /D %%R IN (%1\*) DO ( 
call %run_copy% %%R %2
FOR /D %%S IN (%%R\*) DO ( 
call %run_copy% %%S %2
FOR /D %%I IN (%%S\*) DO ( 
call %run_copy% %%I %2
FOR /D %%J IN (%%I\*) DO ( 
call %run_copy% %%J %2
FOR /D %%K IN (%%J\*) DO ( 
call %run_copy% %%K %2
)
)
)
)
)

:END

@echo on





[ __todst ]


FOR /D %%R IN (%2\*) DO ( 
echo src: %1
echo dst: %%R 
call %chk_copy% %1 %%R
FOR /D %%S IN (%%R\*) DO ( 
echo src: %1
echo dst: %%S
call %chk_copy% %1 %%S
FOR /D %%I IN (%%S\*) DO ( 
echo src: %1
echo dst: %%I
call %chk_copy% %1 %%I
FOR /D %%J IN (%%I\*) DO ( 
echo src: %1
echo dst: %%J
call %chk_copy% %1 %%J
FOR /D %%K IN (%%J\*) DO ( 
echo src: %1
echo dst: %%K
call %chk_copy% %1 %%K
)
)
)
)
)






:

XCOPY 원본 [대상] [/A | /M] [/D[:데이터]] [/P] [/S [/E]] [/V] [/W] [/C] [/I] [/Q] [/F] [/L] [/H] [/R] [/T] [/U] [/K] [/N] [/O] [/X] [/Y] [/-Y] [/Z]

[/EXCLUDE:파일1[+파일2][+파일3]...]

 

원본 복사할 파일을 지정합니다.

대상 새 파일의 디렉터리와 또는 파일 이름을 지정합니다.

/A 보관 특성을 가진 파일을 복사하며, 보관 특성을 수정하지 않습니다.

/M 보관 특성을 가진 원본 파일을 복사하며, 보관 특성을 지웁니다.

/D:m-d-y 지정된 날짜 이후에 바뀐 파일만 복사합니다.

날짜가 지정되지 않으면, 대상 파일보다 새로운 원본 파일만 복사합니다.

/EXCLUDE:파일1[+파일2][+파일3]...

문자열을 포함하는 파일 목록을 지정합니다.

일부 문자열이 복사할 파일의 절대 경로의 일부분과 일치하면 복사할 파일에서 제외됩니다.

예를 들면, obj 또는 .obj에서는 obj 디렉터리 내의 모든 파일을 제외하거나 .obj 확장자를 갖는 모든 파일을 제외합니다.

/P 각 대상 파일을 만들기 전에 물어봅니다.

/S 비어 있지 않은 디렉터리와 하위 디렉터리를 복사합니다.

/E 디렉터리와 하위 디렉터리를 (비어 있어도) 복사합니다.

/S /E 스위치와 같으며, /T를 수정하는 데 사용될 수 있습니다.

/V 각각의 새 파일을 확인합니다.

/W 복사하기 전에, 아무 키나 누르라고 프롬프트 합니다.

/C 오류가 생겨도 복사를 계속합니다.

/I 대상을 찾을 수 없고 두 파일 이상을 복사하면, 대상을 디렉터리로 지정합니다.

/Q 복사하는 동안 파일 이름을 표시하지 않습니다.

/F 복사하는 동안 원본과 대상 파일의 전체 경로 를 표시합니다.

/L 복사는 하지 않고, 복사할 파일을 표시만 합니다.

/H 숨겨진 파일과 시스템 파일도 복사합니다.

/R 읽기 전용 파일을 겹쳐 씁니다.

/T 파일은 복사하지 않고 디렉터리 구조만 복사합니다. 빈 디렉터리와 하위 디렉터리는 포함되지 않습니다.

/T /E 스위치를 함께 사용하면 빈 디렉터리와 하위 디렉터리를 포함합니다.

/U 대상에 이미 있는 파일을 업데이트합니다.

/K 특성을 복사합니다. 일반적으로 Xcopy는 읽기 전용 특성을 지웁니다.

/N 만들어진 짧은 파일 이름을 사용하여 복사합니다.

/O 파일 소유권과 ACL 정보를 복사합니다.

/X 파일 감사 설정을 복사합니다(/O 의미).

/Y 이미 있는 대상 파일을 덮어쓸지를 확인하기 위해 묻는 것을 금합니다.

/-Y 이미 있는 대상 파일을 덮어쓸지를 확인하기 위해 묻습니다.

/Z 다시 시작할 수 있는 모드에서 네트워크 파일을 복사합니다.

/Y 스위치가 COPYCMD 환경 변수에 나타날 수 있습니다.

명령 줄에 있는 /-Y와 함께 무시될 수 있습니다.

[DOS 배치] 소스 백업하는 배치 파일(xcopy)

## 소스폴더 백업하는 배치 파일

 

 

- 파일명     : sourceBackup.bat

- 파일 내용 :  

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: 소스를 백업하는 배치 파일.
:: 예) C:\project1\img 폴더를 
::     C:\backup\img_yyyymmdd_hhmmss 형태의 폴더로 소스 백업.
::
:: 참고: 이미 폴더가 있으면 삭제하고 폴더를 만든다.
::       (폴더명을 시간까지 하면 중복이 없지만 날짜까지만 하면 중복이 생길 수 있다.)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

 

:: 원본폴더 세팅
set sourceDir=C:\project1\
set dirMasterName=img

 

:: 백업경로 세팅
set dirPath=C:\backup\

 

:: 오늘날짜와 현재시간 세팅
set todayDate=%date:~0,4%%date:~5,2%%date:~8,2%
set todayTime=%time:~0,2%%time:~3,2%%time:~6,2%

 

:: 폴더명 조합
set dirName=%dirMasterName%_%todayDate%_%todayTime%
set fullDirName=%dirPath%%dirName%

 

:: 만들 폴더가 이미 있으면 삭제
if exist %fullDirName% (
  rm/s %fullDirName%
)

 

:: 백업 폴더 만들기
md %fullDirName%

 

:: 파일 백업 복사
xcopy %sourceDir%%dirMasterName%\*.* %fullDirName% /e /h /k

 

:: 변수 지우기
set sourceDir=
set dirPath=
set dirMasterName=
set todayDate=
set todayTime=
set dirName=
set fullDirName=








:
[ 스크랩 문서입니다. ]
[[[ 파일은 없네요 ㅋㅋㅋㅋ ]] [[ 일단 공유 부탁을드렸으나, 안주실수도 있으니, 일단 만들어야지 ㅠ.ㅠ 다운로드 되는줄 알고 좋아했는데 ㅋㅋㅋㅋ ]

비슷한 프레임워크를 가진 여러 종류의 프로그램을 개발하다 보면 동일한 파일이 유사한 디렉터리에 존재하는 경우가 많습니다.

 

일일이 손으로 하나하나하나 복사를 하면 실수의 우려도 많고 작업시간도 많이 걸리지요.

 

이에 저는 직접 개발한 이지카피(Easy Copy) 다중 폴더 배치 복사 프로그램 솔루션을 활용하여 개발에 많은 도움을 얻고 있습니다.

 

 

스크린샷

 

아래와 같이 유사한 데이터 파일이 존재하는경우에 주로 사용합니다.

 

 

프로그램의 모습

 




http://a.tk.co.kr/693







: