Check 2 locations for the existance of a file

(imported topic written by SystemAdmin)

im trying to check if a file exists in either location

on 32bit \Program Files\HBAnyware\ and

on 64bit \Program Files (x86)\HBAnyware\

i tried else’ing them together and or’ing them together…

nothing… still throws an error

here are the 2 querys

if exists file(name of drive of windows folder & “\Program Files\HBAnyware\HBAInfo1.txt”) then concatenation ", " of lines whose(it as lowercase contains “port wwn”) of file (name of drive of windows folder & “\Program Files\HBAnyware\HBAInfo1.txt”) else “”

if exists file(name of drive of windows folder & “\Program Files (x86)\HBAnyware\HBAInfo1.txt”) then concatenation ", " of lines whose(it as lowercase contains “port wwn”) of file (name of drive of windows folder & “\Program Files (x86)\HBAnyware\HBAInfo1.txt”) else “”

(imported comment written by BenKus)

This should work:

if exists file(name of drive of windows folder & “\Program Files\HBAnyware\HBAInfo1.txt”) then concatenation ", " of lines whose(it as lowercase contains “port wwn”) of file (name of drive of windows folder & “\Program Files\HBAnyware\HBAInfo1.txt”) else if exists file(name of drive of windows folder & “\Program Files (x86)\HBAnyware\HBAInfo1.txt”) then concatenation ", " of lines whose(it as lowercase contains “port wwn”) of file (name of drive of windows folder & “\Program Files (x86)\HBAnyware\HBAInfo1.txt”) else “”

You might also try this:

concatenation ", " of lines whose(it as lowercase contains “port wwn”) of files “hbainfo1.txt” of folders ((“Program Files\HBAnyware”;“Program Files (x86)\HBAnyware”) of drive of windows folder)

Ben