[Windows] touch가 필요할 때

윈도우즈 환경에서 개발하다보니, Linux 환경에서 사용하는 몇 가지 command들이 그립다.

touch 명령을 주고 싶은데, 다들 설치하라고 할 수도 없고..

Windows 환경에서 touch와 같이 날짜와 시간만 업데이트 하고 싶을 때, 해당디렉토리로 이동한 후, 다음과 같이 하면 된단다.

copy /b filename.ext +,,

이동하기 싫으면 다음과 같이 하면 된다.

copy /b D:\PATH\foo\filename.ext+,, D:\PATH\foo\filename.ext

이걸 왜 하냐고?

다음과 같은 코드 때문이다.

char *pStrTime=__TIME__;

char *pStrDate=__DATE__;

참고: http://superuser.com/questions/10426/windows-equivalent-of-the-linux-command-touch

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다