Re pillow:
for 中允许使用 do (statement1) & (statement2) & ... 的语法,我在5楼中的第二行代码便是类似的实现。
請問還有其它更好的方法嗎?比如用&那樣的方式
下面还是批处理的方案,将它保存至批处理中,并置于 contact*.xls 目录下,然后点击运行即可打开对应 excel 文档。
for /f "delims=" %%f in ('dir contact*.xls /b /o-n') do copy "%%f" "dest_path\." && start "dest_path\%%~nxf" && goto:EOF
或者将批处理放在各个用户的目标目录下,批处理内容为:
for /f "delims=" %%f in ('dir src_path\contact*.xls /b /o-n') do copy "%%f" && start "%%~nxf" && goto:EOF
至于goto:EOF ,:EOF 为批处理文件缺省的结束标签,goto:EOF 即为在for循环执行一次,找到最新的文件并作出处理后,直接跳出。