본문 바로가기
Batch file

Batch 파일을 이용하여 메모 작성하기

by treeCoder 2020. 12. 21.

윈도우즈에는 스티커 메모가 있다. 이것과 비할바는 아니지만

코맨드 라인상에서 간단하게 한줄 씩 입력하는 메모 프로그램을 만들어 보았다.

 

@echo Off

 

if [%1]==[] (  

    echo.  

    echo     Usage

    echo. 

    echo     memo -s

    echo         SHOWS memo.txt

    echo. 

    echo     memo -f

    echo         Opens the FOLDER this program is. 

    echo. 

    echo     memo "Any message you want to add to the memo.txt" 

    echo         Saves your message to the memo.txt

    echo.

) else if [%1]==[-s] (

    notepad "%~d0%~p0memo.txt"

)  else if [%1]==[-f] (

    start   ""    "%~d0%~p0" 

) else (

    echo %1 >> "%~d0%~p0memo.txt"

)

 

댓글