DOpus自动创建并打开日期文件夹

本文介绍了一种通过自定义工具栏按钮快速访问特定工作文件夹的方法。只需简单地复制提供的脚本并粘贴到工具栏自定义区域,即可实现左键打开今天的文件夹、右键打开当月的文件夹、中键打开工作记录.xlsx的功能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

左键打开今天文件夹, 右键打开当月文件夹, 中键打开工作记录.xlsx, 复制以下代码, 在工具栏上右键-->自定义, 右击空白处粘贴即可, 根据自己情况适当编辑一下

<?xml version="1.0"?>
<button backcol="none" display="both" label_pos="right" textcol="none" type="three_button">
<label>今天</label>
<icon1>#sort_date</icon1>
<button backcol="none" display="both" label_pos="right" textcol="none">
<label>今天</label>
<tip>E:\工作记录\xxxx年\xxxx年xx月\xxxx年xx月xx日</tip>
<icon1>#sort_date</icon1>
<function type="script">
<instruction>@script:jscript</instruction>
<instruction>function myGetDate() {</instruction>
<instruction> var zh = [&apos;一&apos;, &apos;二&apos;, &apos;三&apos;, &apos;四&apos;, &apos;五&apos;, &apos;六&apos;, &apos;七&apos;];</instruction>
<instruction> var date = new Date();</instruction>
<instruction> return {</instruction>
<instruction> year : date.getFullYear(),</instruction>
<instruction> month : date.getMonth() + 1,</instruction>
<instruction> date : date.getDate(),</instruction>
<instruction> week : date.getDay(),</instruction>
<instruction> hours : date.getHours(),</instruction>
<instruction> minutes : date.getMinutes(),</instruction>
<instruction> seconds : date.getSeconds(),</instruction>
<instruction> week_zh : zh[date.getDay()-1]</instruction>
<instruction> };</instruction>
<instruction>}</instruction>
<instruction>function OnClick(args) {</instruction>
<instruction> var date = myGetDate();</instruction>
<instruction> var path = [];</instruction>
<instruction> path.push(&apos;"E:\\工作记录\\&apos;);</instruction>
<instruction> path.push(date.year + &apos;年\\&apos;);</instruction>
<instruction> path.push(date.year + &apos;年&apos;);</instruction>
<instruction> path.push((date.month >= 10 ? date.month : &apos;0&apos; + date.month) + &apos;月\\&apos;);</instruction>
<instruction> path.push(date.year + &apos;年&apos;);</instruction>
<instruction> path.push((date.month >= 10 ? date.month : &apos;0&apos; + date.month) + &apos;月&apos;);</instruction>
<instruction> path.push((date.date >= 10 ? date.date : &apos;0&apos; + date.date) + &apos;日&apos;);</instruction>
<instruction> path.push(&apos; 星期&apos; + date.week_zh + &apos;"&apos;);</instruction>
<instruction> args.func.command.AddLine(&apos;Go &apos; + path.join(&apos;&apos;) + &apos; newtab&apos;);</instruction>
<instruction> args.func.command.AddLine(&apos;CreateFolder name=&apos; + path.join(&apos;&apos;));</instruction>
<instruction> args.func.command.AddLine(&apos;Go &apos; + path.join(&apos;&apos;));</instruction>
<instruction> args.func.command.Run();</instruction>
<instruction>}</instruction>
</function>
</button>
<button backcol="none" display="both" label_pos="right" textcol="none">
<label>今天</label>
<tip>E:\工作记录\xxxx年\xxxx年xx月</tip>
<icon1>#sort_date</icon1>
<function type="script">
<instruction>@script:jscript</instruction>
<instruction>function myGetDate() {</instruction>
<instruction> var zh = [&apos;一&apos;, &apos;二&apos;, &apos;三&apos;, &apos;四&apos;, &apos;五&apos;, &apos;六&apos;, &apos;七&apos;];</instruction>
<instruction> var date = new Date();</instruction>
<instruction> return {</instruction>
<instruction> year : date.getFullYear(),</instruction>
<instruction> month : date.getMonth() + 1,</instruction>
<instruction> date : date.getDate(),</instruction>
<instruction> week : date.getDay(),</instruction>
<instruction> hours : date.getHours(),</instruction>
<instruction> minutes : date.getMinutes(),</instruction>
<instruction> seconds : date.getSeconds(),</instruction>
<instruction> week_zh : zh[date.getDay()-1]</instruction>
<instruction> };</instruction>
<instruction>}</instruction>
<instruction>function OnClick(args) {</instruction>
<instruction> var date = myGetDate();</instruction>
<instruction> var path = [];</instruction>
<instruction> path.push(&apos;"E:\\工作记录\\&apos;);</instruction>
<instruction> path.push(date.year + &apos;年\\&apos;);</instruction>
<instruction> path.push(date.year + &apos;年&apos;);</instruction>
<instruction> path.push((date.month > 10 ? date.month : &apos;0&apos; + date.month) + &apos;月"&apos;);</instruction>
<instruction> args.func.command.AddLine(&apos;Go &apos; + path.join(&apos;&apos;) + &apos; newtab&apos;);</instruction>
<instruction> args.func.command.AddLine(&apos;CreateFolder name=&apos; + path.join(&apos;&apos;));</instruction>
<instruction> args.func.command.AddLine(&apos;Go &apos; + path.join(&apos;&apos;));</instruction>
<instruction> args.func.command.Run();</instruction>
<instruction>}</instruction>
</function>
</button>
<button backcol="none" display="both" label_pos="right" textcol="none">
<label>今天</label>
<tip>E:\工作记录\工作记录.xlsx</tip>
<icon1>#sort_date</icon1>
<function type="normal">
<instruction>excel E:\工作记录\工作记录.xlsx</instruction>
</function>
</button>
</button>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值