Page 1 of 1

PDF-Tools (v7): is there a way to log all processed files in a log file?

Posted: Sat Jul 14, 2018 7:52 am
by bernard meunier
Hi,
When doing a script, is it possible to add an action to log all processed filenames/path in a log
file along results (success / skipped) for each?
Regards
Bernie

Re: PDF-Tools (v7): is there a way to log all processed files in a log file?

Posted: Mon Jul 16, 2018 2:16 pm
by Sean - Tracker
Hi Bernard,

Can you please clarify what you mean by "When doing a script"?

Presently, there is no action in PDF-Tools that can be used to log processed filenames/paths etc in the Actions Library of the software. However, there is a Tool Report feature that can be used to create and save a breakdown of which tools are used, which files are processed, the outcome of each tool operation - success/failure etc. Click the Options menu, then click Tool Report to enable/disable the feature. It will appear in the lower section of the user interface, as detailed in the image below. Click Options to determine which messages are displayed, and/or click Save to save tool reports to a text file.
tool.report.image.png
Hope this helps,

Sean,

Tracker Software Products

Re: PDF-Tools (v7): is there a way to log all processed files in a log file?

Posted: Mon Jul 16, 2018 7:13 pm
by bernard meunier
Hi,

Thanks for the suggestion. I will have a look at. May be this could answer what I'm looking for.

Initially my intend is to have a trace of files processed by a particular script since the creation of the
script.

Regards
Bernard

Re: PDF-Tools (v7): is there a way to log all processed files in a log file?

Posted: Mon Jul 16, 2018 11:55 pm
by TrackerSupp-Daniel
Hello Bernard,
Just to verify, when you say Script, you do mean the actions on a tool correct?
My interpretation is thus, so please excuse me if my answer here is not helpful.

The Tool Report function has a great degree of customization available, and can be setup to show all messages, as well as the ability to save the report afterwards. This may help in your endeavors!

Re: PDF-Tools (v7): is there a way to log all processed files in a log file?

Posted: Tue Jul 17, 2018 4:03 pm
by bernard meunier
hi,
in answer to: you do mean the actions on a tool correct?
Yes
Regards
Bernard

Re: PDF-Tools (v7): is there a way to log all processed files in a log file?

Posted: Tue Jul 17, 2018 4:33 pm
by TrackerSupp-Daniel
:)

Re: PDF-Tools (v7): is there a way to log all processed files in a log file?

Posted: Thu Jul 19, 2018 1:07 pm
by bernard meunier
Hi,
I did test... looks like report is not updated when script (tools) il lauch by drag&drop files onto a tool shortcut on the desktop.
Is that the same at your side?
Regards
Bernard

Re: PDF-Tools (v7): is there a way to log all processed files in a log file?

Posted: Thu Jul 19, 2018 5:50 pm
by TrackerSupp-Daniel
Hello Bernard,
So long as all the required options are set in the reporting pane, I find that the tools report fills up regardless of the tool start method.
Please ensure you are using V7 build 326, you should be seeing messages populate the log if it has been configured correctly.

Re: PDF-Tools (v7): is there a way to log all processed files in a log file?

Posted: Thu Jul 19, 2018 8:31 pm
by bernard meunier
Hi,
My actual installed version is
version
version
capture_version.PNG (12.12 KiB) Viewed 11604 times

and settings are
settings
settings

and log is not updated when using drag&drop
Do you thing 326 will solve this?
Regards
Bernard

Re: PDF-Tools (v7): is there a way to log all processed files in a log file?

Posted: Thu Jul 19, 2018 9:18 pm
by TrackerSupp-Daniel
Hello Bernard,
It seems that you will need to have Messages d'information enabled in order to see these messages.

Re: PDF-Tools (v7): is there a way to log all processed files in a log file?

Posted: Sat Jul 21, 2018 2:55 pm
by bernard meunier
Hi,
Thanks,
I have installed last version to test w/o success.
Report log is only updated when I execute a script from within PDFtools.
Usually PDFTools is not started at my site. I use to drag&drop files onto desktop
shortcuts and whatever I do, I don't see anything in the report pane with
is always empty when I start PDFtools to review log.
May be something else should be done at my side?
Regards
Bernard

Re: PDF-Tools (v7): is there a way to log all processed files in a log file?

Posted: Mon Jul 23, 2018 5:43 pm
by TrackerSupp-Daniel
Hello Bernard,

I have reported this to the Dev team and may be creating a formal bug report shortly.
Terribly sorry for the inconvenience this has caused.

Re: PDF-Tools (v7): is there a way to log all processed files in a log file?

Posted: Mon Jul 23, 2018 6:08 pm
by TrackerSupp-Daniel
Hello again Bernard,
After speaking with the dev team, i have found the cause of the issue.

I had misinterpreted you before, and had falsely assumed you were dragging the files onto the tools within the PDf-Tools window.
Knowing now that you were using a shortcut within windows i have some more news. The windows shortcuts use command line switches for their reporting independently from the GUI. however they are uable to log every action that occurs, and can only report errors.

To enable error reporting for the shortcuts/command line please include the following to your tool:

Code: Select all

/RunTool:showrep=always
The /RunTool portion should already exist, simply append the :showrep=always afterwards.
Meaning that your target shortcut properties should appear akin to this:

Code: Select all

"C:\Program Files\Tracker Software\PDF Tools\PDFXTools.exe" /RunTool:showrep=always "{E40C0181-8406-40FA-9BECBB2C3522472B}"
DMKB18July308.png

Re: PDF-Tools (v7): is there a way to log all processed files in a log file?

Posted: Sun Jul 29, 2018 11:46 am
by bernard meunier
Hi,
I did test and it works but not as expected!
I got the report on screen after completion of tool execution...I expected something silent/hidden with cumulative log in a log file which could be reviewed later.
Is there something possible to output result added (appended) to a log file?
Regards
Bernard

Re: PDF-Tools (v7): is there a way to log all processed files in a log file?

Posted: Sun Jul 29, 2018 12:39 pm
by DenisO
bernard meunier wrote:Hi,
I did test and it works but not as expected!
I got the report on screen after completion of tool execution...I expected something silent/hidden with cumulative log in a log file which could be reviewed later.
Is there something possible to output result added (appended) to a log file?
Regards
Bernard
Hi Bernard,
try to use /Log:full option. For example: PDFXTools.exe /Log:full D:\tools.log /RunTool "pdft.tool.resizePages". Hopefully this will help.
Best regards

Re: PDF-Tools (v7): is there a way to log all processed files in a log file?

Posted: Sun Jul 29, 2018 1:02 pm
by bernard meunier
Great! more or less this do the job...I tested Something like >>D:\Tools.log so that to have cumulatives entries
but this Don't works :-(
Is there Something I can do?
Bernard

Re: PDF-Tools (v7): is there a way to log all processed files in a log file?

Posted: Sun Jul 29, 2018 4:40 pm
by DenisO
bernard meunier wrote:I tested Something like >>D:\Tools.log so that to have cumulatives entries
What is you scenario of executing tool? Do you want to append report to the log file after every tool execution? Currently PDF Tools do not append log files.
Note that PDF Tools have feature to monitor specific folder and execute tool on new files added to the folder ( Options->Folder Monitors). There you can save report using special macros, for example timestamp
report.JPG

Re: PDF-Tools (v7): is there a way to log all processed files in a log file?

Posted: Mon Jul 30, 2018 8:11 am
by bernard meunier
Hi,

Thanks, I think I have too have a look to folder monitoring but my usage of desktop tools
won't probably not be compatible / appliable:

I used to organize pdf files (natively created or scanned document) within folders and sub-folder
organized by topic: payrol / bank / insurance /health. For convenience not all files are password
protected within a folder. I'm only protecting some of them using a drag&drop onto relevant tool
desktop shortcut. Using folder monitor feature would oblige to have 2 folders within each topic
folder: one monitored (for docs needing password) and the other not. This will oblige user (me!)
to add any new folders to the monitored list...not enough convenient for me.

To answer the question "Do you want to append report to the log file after every tool execution?"
Yes:
I'm looking for cumulative log ... and if desired for convenience not be displayed to
user after tool execution for exemple only in case of tool execution error or.

The ultimate goal is to be able to parse the log file to see either or not a particular file
have ever been processed. This is the case when I don't found a file in a folder where
it is expected to be... cummulative log would help determining either or not a "such" named
file could have ever been processed (have existed!).

Hope this help clarifying.
Regards
Bernard

Re: PDF-Tools (v7): is there a way to log all processed files in a log file?

Posted: Mon Jul 30, 2018 12:03 pm
by Tracker Supp-Stefan
Hello Bernard,

So you need not just a log, but a record of all files processed. I am afraid that logs are normally not intended to work that way.
You can either try with the timestamps as DenisO suggested, or make sure after every use of the PDF Tools to check the generated Log and copy the list of processed files in a separate file that you will keep as a "list of processed files" record.

Regards,
Stefan

Re: PDF-Tools (v7): is there a way to log all processed files in a log file?

Posted: Mon Jul 30, 2018 5:02 pm
by bernard meunier
Hi Stefan,

More or less you well understood what I was looking for.
I understand that I won't get this off the shelf... may be you will add later on a switch
so that to be able to have all reports cumulated in a file? (wish!)

Thanks
Regards
Bernard

Re: PDF-Tools (v7): is there a way to log all processed files in a log file?

Posted: Mon Jul 30, 2018 6:54 pm
by DenisO
Hi Bernard,
I have temporary solution for you. In attachemt you can find archive with VBsript which runs tool and then appends its report to full log. You can drag and drop files on it.
In order to run your tool you should change:
toolName - Your tool name
toolLog - path to log to save report from last run
fullLog - path to log with previous reports to append new one
On my side everything works fine. I hope this will help you.

Re: PDF-Tools (v7): is there a way to log all processed files in a log file?

Posted: Mon Jul 30, 2018 10:07 pm
by TrackerSupp-Daniel
Thanks for that DenisO!

Looking forward to hearing if that helps Bernard :)

Re: PDF-Tools (v7): is there a way to log all processed files in a log file?

Posted: Tue Jul 31, 2018 4:46 pm
by bernard meunier
Hi,
I will have a look next weekend. thanks.
I will came back later on with results.
Regards
Bernard

Re: PDF-Tools (v7): is there a way to log all processed files in a log file?

Posted: Tue Jul 31, 2018 5:15 pm
by TrackerSupp-Daniel
:)

Re: PDF-Tools (v7): is there a way to log all processed files in a log file?

Posted: Sun Aug 05, 2018 8:36 am
by bernard meunier
Hi,
I did test and I'm facing an issue because names includes spaces!
I did try adding """ in the script but I Don't manage getting the script properly working…
the script is well started but Don't get filnames and log in empty.

here is an example ; "C:\Apl\Tracker Software\RUNcopy.vbs" "D:\DHome\XPdocs\Papa\paperport_pdf\CL&Banque\Banque Postale\Compte Indivis\Relevés de comptes\Copie de BPI relevé n°7 juillet2018 20180804.pdf"
I Added a msgbox in the script and got Following:
[img]
CaptureResult.PNG
CaptureResult.PNG (6.25 KiB) Viewed 11460 times
[/img]

I did test for docs w/o spaces in name of dir path an it worked fine… at least for one file.
Directions or tips are welcome.

at this time script look like :
toolLog = "D:\DHome\XPdocs\Papa\GestPC\Rapport_PDFTools.txt"
fullLog = "D:\DHome\XPdocs\Papa\GestPC\Rapport_PDFTools_cumul.log"
toolName = "{E4919750-1F40-4BDE-95B53757E3145820}"
toolsPath = """C:\\Apl\\Tracker Software\\PDF Tools\\PDFXTools.exe"""
list = ""

Set objArg = WScript.Arguments
if objArg.count = 0 then WScript.Quit
for i=0 to objArg.Count-1
list = list & objArg(i)& " "
next

command = toolsPath & " /Log:full """ & toolLog &" "" /RunTool """ & toolName & """ " & list
msgbox command


Set WshShell = CreateObject("WScript.Shell")
retcode = WshShell.Run(command, 1, true)
if retcode = 0 then

Set fs = CreateObject("Scripting.FileSystemObject")
Set fLog = fs.OpenTextFile("" & fullLog &"",8,true, -1)
Set tLog = fs.OpenTextFile("" & toolLog &"", 1, false,-1)

data_file = tLog.ReadAll

fLog.Write(data_file)
fLog.Close()
tLog.Close()
else
msgbox retcode

End if
Regards
Bernard

Re: PDF-Tools (v7): is there a way to log all processed files in a log file?  SOLVED

Posted: Sun Aug 05, 2018 7:13 pm
by DenisO
Hi Bernard,
I've fixed the script to work with spaces in filenames. Please see the attachment

Re: PDF-Tools (v7): is there a way to log all processed files in a log file?

Posted: Mon Aug 06, 2018 9:19 am
by bernard meunier
Hi,

Thanks, I will test it next weekend. Be sure I will give you feedback after testing.

Regards
Bernard

Re: PDF-Tools (v7): is there a way to log all processed files in a log file?

Posted: Mon Aug 06, 2018 12:41 pm
by Tracker Supp-Stefan
Thanks for this scriot DenisO!

Looking forward to your feedback Bernard!

Regards,
Stefan

Re: PDF-Tools (v7): is there a way to log all processed files in a log file?

Posted: Mon Aug 06, 2018 4:55 pm
by bernard meunier
Perfect !

I had a chance to test it and new script well works as expected.
Special thanks to DenisO.

Regards
Bernard

Re: PDF-Tools (v7): is there a way to log all processed files in a log file?

Posted: Mon Aug 06, 2018 7:10 pm
by Paul - Tracker Supp
:)