20181031s
CMD 右键发送到共享目录
1.打开sendto目录 shell:sendto
2. 创建log.cmd脚本文件(记事本编辑)
@rem 20181017jianpf
@echo off
@title %1 “发送中…”
@color c
@rem 发送到位置
set sendto=\Ylwj04\ylwj_04共享
set log.txt=E:\Work\Temp\sendto.log.txt
for /f %%i in (‘date /t’) do set odate=%%i
for /f %%i in (‘time /t’) do set otime=%%i
set odt=%odate% %otime%
echo %odt% %1
echo …
@rem 覆盖确认模式 copy /-y %1 %sendto% && echo %odate% %otime% %1 >>%log.txt% && color a
copy %1 %sendto% && echo %odate% %otime% %1 >>%log.txt% && color a
pause
type %log.txt%
echo %odt% 发送时间
pause
4.发送测试
5.继续调试使用
6.改进(新记录插入到开头)
copy %1 %sendto% && echo %odt% %1 >%log.txt%.tmp && color a
type %log.txt%>>%log.txt%.tmp
type %log.txt%.tmp>%log.txt%
del %log.txt%.tmp
20181120
简单记录本
@rem 20181118jianpf
@echo off
@title %1 “开单中…”
@color c
@rem 开单位置
set log.txt=E:\Work\Temp\kaidan.log.txt
@echo %1
@echo “请输入备注:(T板厚,材料,激光费,尺寸,…)”
set /p note0=
set /p note1=
set /p note2=
set note= %note0% %note1% %note2%
for /f %%i in (‘date /t’) do set odate=%%i
for /f %%i in (‘time /t’) do set otime=%%i
set odt=%odate% %otime%
echo %odt% %1
echo …
echo %odate% %otime% %1 (T%note%) >%log.txt%.tmp && color a
type %log.txt%>>%log.txt%.tmp
type %log.txt%.tmp>%log.txt%
pause
echo %odt% 开单时间
more %log.txt%
echo %odt% 开单时间
pause