maybe this Powershell script will be helpful, it saves me a lot of time. I personally use it for automated export of multiple projects included in specific directory into one specific output format.
PS
Code: Select all
$helpman = 'enter path to Help+Manual .exe file'
$runPath = 'enter complete path for directory where all respective files are stored'
$template = "enter path for template file"
$filthmxz = Get-ChildItem -Path $runPath -Include *.hmxz -Recurse -Force | Where-Object {$_.Directory.Name -ne 'enter the name of directory not included in search, e.g. if there is some folder with previous versions' }
$filthmxz | %{
$originfile = "$($_.FullName)"
$outputfile = "$($_.Directory.FullName)\$($_.Name)"
$log = "$($_.Directory.FullName)\$($_.BaseName).txt"
$arg = @("`"$($originfile)`"" #cmd switches listed in H+M helper, written in form understandable for PS
"/PDF=`"$($outputfile)`"" #select output format
'/I=PDF' #select publishing settings
"/Template=`"$($template)`""
"/L=`"$($log)`"" #optional, creates .txt file in same folder as .hmxz file with basic console output only
'/debug' #optional, if used, manual confirmation for each file is necessary
)
Write-Host "Starting helpman for: $($_.FullName)" #optional
Write-Host $arg #optional
Start-Process $helpman -ArgumentList $arg -PassThru -NoNewWindow
}
#create list of exported items with export date
$index = "enter path to index file"
$filtpdf = Get-ChildItem -Path $runPath -Include *.pdf -Recurse -Force | Where-Object {$_.Directory.Name -ne 'enter the name of directory not included in search, e.g. if there is some folder with previous versions' }
Add-Content $index -Value (Get-Date) -PassThru
$filtpdf | Select-Object -Property BaseName, LastWriteTime | Sort-Object -Property BaseName, LastWriteTime | Out-String -Width 8 | Out-File $index -Append