廣告

2024 年 4 月
1234567
891011121314
15161718192021
22232425262728
2930  

彙整

DOS rename+日期格式

近日要使用WINDOWS備份,每天要依日期做檔案區分,就想到依日期處理檔名方式,運用下列方式應該就可以達到需求。

=====================================================

參考出處:http://ubuntufish.blogspot.com/2010/07/dos-rename.html
DOS rename+日期格式

c:>echo %date% 2010-07-15 星期四 c:>echo %date:~0,4% 2010 c:>echo %date:~-3% 星期四 c:>echo %date:~5,5%%date:~8,2% 0715 c:>echo %date:~0,4%%date:~5,2%%date:~8,2% 20100715 c:> rename A.txt %date:~5,5%%date:~8,2%.txt 就會將A.TXT更名為 "系統日期 […]