I like to write an task which "maintaince" the archives (reprocess) => and i also like to write this script in powershell.
The issue i have, that the piarchss -if xxx -of xxx somehow doesn't work in powershell (i looks like the arguments aren't processed to the piarchss)
( i found some issues on the internet with multiple arguments, but i still have no clue how to get this to work)
Here is my sourceffile .. maybe someone has an idea why ?
Write-Host "Processing Archive" $args
$tempname = $args + "_Temp"
$orgname = $args
Write-Host "Try to unregister"
# Unregister Archive => works
c:\pi\adm\piartool -au $orgname
Write-Host "Try to Rename"
# Rename both files
ren $orgname $tempname
ren $orgname".ann" $tempname".ann"
Write-Host "Try to Process"
# Process the Archives => Idea A
$arg1 = '-if'
$arg2 = $tempname
$arg3 = '-of'
$arg4 = $orgname
$allArgs = @($arg1, $arg2, $arg3, $arg4)
# Process the Archives => Idea B
Write-Host "Try to Register"
# Register the Archive => works
c:\pi\adm\piartool -ar $orgname
Between Try to Process and Try to Register there is no message on the screen
The command works if i just use it in the command prompt.