Hi, ich hab ewig viele Abfragen in unterschiedlichen Ordner ob jeweils eine *.*p* Datei existiert. Diese Liste wird immer länger und länger und ich habe mich gefragt ob ich das nicht irgendwie intelligenter lösen kann. hab aber keine Idee da sich ja der Pfad auch immer ändert...Vllt habt ihr ja eine Idee...
Hier mal der Code
Code
Const $Basisdir = "D:\Workflow\"
If FileExists ($Basisdir&"10x16\10x16.Layout\*.p*" ) Then
$type="10x16"
$workflowtype = "Layout"
ProcessFile ($Type)
EndIf
If FileExists ($Basisdir&"10x16\10x16.Vorschau\*.p*" ) Then
$type = "10x16"
$workflowtype = "Vorschau"
ProcessFile ($Type)
EndIf
If FileExists ($Basisdir&"10x16\10x16.U4\*.p*" ) Then
$type = "10x16"
$workflowtype = "U4"
ProcessFile ($Type)
EndIf
If FileExists ($Basisdir&"10x16\10x16.Druck\*.p*" ) Then
$type = "10x16"
$workflowtype = "Druck"
ProcessFile ($Type)
EndIf
;12x19
If FileExists ($Basisdir&"12x19\12x19.Layout\*.p*" ) Then
$type="12x19"
$workflowtype = "Layout"
ProcessFile ($Type)
EndIf
If FileExists ($Basisdir&"12x19\12x19.Vorschau\*.p*" ) Then
$type = "12x19"
$workflowtype = "Vorschau"
ProcessFile ($Type)
EndIf
If FileExists ($Basisdir&"12x19\12x19.U4\*.p*" ) Then
$type = "12x19"
$workflowtype = "U4"
ProcessFile ($Type)
EndIf
If FileExists ($Basisdir&"12x19\12x19.Druck\*.p*" ) Then
$type = "12x19"
$workflowtype = "Druck"
ProcessFile ($Type)
EndIf
;etc....die Liste ist noch viiieeel länger....
Alles anzeigen
MfG Albeck