我需要在将别名的产品服务器上创建一个符号链接/快捷方式:
agent_ivr_general_info.CURRENT
到
agent_ivr_general_info.[todays date].log
因为我每天都有滚动日志:
agent_ivr_general_info.2011-04-28.log
我只想打开 1 个链接以访问当前。
嗯......我想一种技术是使用Sysinternals 的 JUNCTION.EXE与每天午夜后运行的计划任务,并使用类似以下内容来更改链接:
cd TARGET_DIRECTORY
:: get date -- this only works for default US date, YMMV
set day=%DATE:~7,2%
set month=%DATE:~4,2%
set year=%DATE:~-4%
:: set %today% formatted as YYYY-MM-DD
set today=%year%-%month%-%day%
:: delete old link
junction -d CURRENT
:: create new one
junction -c CURRENT .\%today%