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

左键打开今天文件夹, 右键打开当月文件夹, 中键打开工作记录.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;&quot;E:\\工作记录\\&apos;);</instruction>
			<instruction>	path.push(date.year + &apos;年\\&apos;);</instruction>
			<instruction>	path.push(date.year + &apos;年&apos;);</instruction>
			<instruction>	path.push((date.month &gt;= 10 ? date.month : &apos;0&apos; + date.month) + &apos;月\\&apos;);</instruction>
			<instruction>	path.push(date.year + &apos;年&apos;);</instruction>
			<instruction>	path.push((date.month &gt;= 10 ? date.month : &apos;0&apos; + date.month) + &apos;月&apos;);</instruction>
			<instruction>	path.push((date.date &gt;= 10 ? date.date : &apos;0&apos; + date.date) + &apos;日&apos;);</instruction>
			<instruction>	path.push(&apos; 星期&apos; + date.week_zh + &apos;&quot;&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;&quot;E:\\工作记录\\&apos;);</instruction>
			<instruction>	path.push(date.year + &apos;年\\&apos;);</instruction>
			<instruction>	path.push(date.year + &apos;年&apos;);</instruction>
			<instruction>	path.push((date.month &gt; 10 ? date.month : &apos;0&apos; + date.month) + &apos;月&quot;&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>

你可能感兴趣的:(文件夹)