I would like that to use the shell version of 3-Heights PDF Analysis & Repair (https://www.pdf-tools.com/pdf20/en/prod ... is-repair/) in windows 8.1 64.
I succeed in running it using this command line in DOS ("Command Prompt") :
Code: Select all
for /R "J:\test\PB_006\" %i in (*.pdf) do pdrepair "%i" %~pi%~ni_repared.pdf
(I was helped by its manual page 10 : https://www.pdf-tools.com/public/downlo ... s/reps.pdf and the FAQ question "How can I use Shell tools to include subdirectories?"
https://www.pdf-tools.com/pdf20/en/supp ... questions/ )
I thought that I bypass the space problem using an autohotkey script. The goal is to select a source folder and a destination folder (usually the same) and run the exe command on every PDF files contained in every folders and subfolders (and optionally adds "_repared.pdf" to the filename. I have tried to modify an old one which gives me this :
Code: Select all
FileSelectFolder,SourcePath,,0,Select Source Folder
If SourcePath =
ExitApp
FileSelectFolder,TargetPath,*%SourcePath%,0,Select Target Folder
If TargetPath =
ExitApp
Loop,%SourcePath%\*.*,2,0
{
FolderSize = 0
Loop, %A_LoopFileFullPath%\*.pdf, , 1
FolderSize += %A_LoopFileSize%
If FolderSize >0
RunWait,c:\Program Files (x86)\PDF Tools AG\bin\pdrepair.exe "%TargetPath%\%A_LoopFileName%_repared.pdf" "%A_LoopFileFullPath%\*.pdf"
}
Alas it loads and close the DOS window very fast and no files are modified or created.
I also tried this with the same result (without "_repared.pdf") :
Code: Select all
RunWait,c:\Program Files (x86)\PDF Tools AG\bin\pdrepair.exe "%TargetPath%\%A_LoopFileName%_repared.pdf" "%A_LoopFileFullPath%\*.pdf"