반응형 cmd2 dos: cmd date yyyymmdd 로 추출하기 set 명령에 대한 tilda 연산자는 다음과 같은 방식으로 변수에서 하위 문자열을 추출함.~begining_char,number_of_chars날짜가 2024-11-29 인 경우 연도를 구하려면,set year =%date:~0,4%set month=%date:~5,2% set day=%date:~8,2% set today=%year%%month%%day% echo %today%20241129날짜나 월이 10미만인 경우 앞에 0을 붙이는 처리과정이 필요 함. 문제없음. 20241202 제대로 변환 됨!!! Building a date string in yyyy.mm.dd format in Batch (cmd.exe)a walkthrough with code snippetstechnoteswowow.me.. 2024. 11. 29. nwc 서버에 복사하기 setlocal set tgt_fd="X:\02. Review\01. General\02. Clash Detective\04. Upload NWC\05 건축\ rem set tgt_fd="D:\NWC\05 건축\ copy/y "CJ_M15P3_C01_NA_ST_NA_NA_Central.nwc" %tgt_fd%01. FAB\" 2024. 11. 14. 이전 1 다음 반응형