민서네집

[batch] sleep 배치파일 만들기 본문

프로그래밍

[batch] sleep 배치파일 만들기

브라이언7 2018. 1. 6. 15:40

How to sleep for 5 seconds in Windows's Command Prompt? (or DOS)

https://code.i-harness.com/en/q/198492


위 웹페이지에 쓰여 있는대로 timeout, choice 등의 batch 명령을 사용할 수도 있다.


python - Sleeping in a batch file


https://code.i-harness.com/en/q/2889c


@ECHO OFF
REM %1 is the number of seconds for the delay, as specified on the command line
> "%Temp%.\sleep.vbs" ECHO WScript.Sleep %~1 * 1000
CSCRIPT //NoLogo "%Temp%.\sleep.vbs"
DEL "%Temp%.\sleep.vbs"

[출처] http://www.robvanderwoude.com/wait.php


위와 같이 sleep.bat 배치 파일을 만들어서 사용하면 


sleep 3.14


이런 식으로 초 단위로 소숫점으로 지정해 줄 수도 있다.


'프로그래밍' 카테고리의 다른 글

git - Pull Request  (0) 2018.01.10
Private Git Repository  (0) 2018.01.10
[batch] console 프로그램 실행시간 구하기  (0) 2018.01.06
User agent 를 분석하는 API  (0) 2017.08.03
plotly  (0) 2016.12.05
Comments