将PDF文件跟踪器创建为批处理文件 [英] Creating a PDF file tracker as Batch file

查看:37
本文介绍了将PDF文件跟踪器创建为批处理文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个批处理文件,该文件应该跟踪我系统上打开的PDF文件.一旦有人打开PDF文件,该文件的名称以及访问时间就会记录在日志文件中.这是我的批处理文件的代码:

I have created a batch file which is supposed to keep track of the opened PDF files on my system.As soon as someone opens the PDF file,the name of the file as well as time of access is recorded in a log file. Here is code of my batch file:

@echo off
echo FILE ACCESSED %1 >> I:\Batch\log.txt
echo TIME OF ACCESS %TIME% >> I:\Batch\log.txt
"C:\Program Files\Foxit Software\Foxit Reader\Foxit Reader.exe" %1
EXIT

我还将此批处理文件设置为打开PDF文件的默认应用程序.现在,问题是,一旦我打开任何PDF文件,许多cmd窗口就会开始无休止地打开和关闭.请提出一些补救措施.

I have also set up this batch file as the default application fr the PDF files to open with. Now,the problem is,as soon as I open any PDF file,many cmd windows start opening and closing unendingly. Please suggest some remedy.

谢谢....

推荐答案

@echo off
copy %1 %1.tmp
echo FILE ACCESSED %1 >> I:\Batch\log.txt
echo TIME OF ACCESS %TIME% >> I:\Batch\log.txt
"C:\Program Files\Foxit Software\Foxit Reader\Foxit Reader.exe" %1.tmp
del %1.tmp
EXIT

这篇关于将PDF文件跟踪器创建为批处理文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆