Hi Paula,
You could try opening the files with a dummy (or null) password and then process the returned error code. Here's an example;
begin
!
! create a file with no password
erase "FileNoPass",err=*next
keyed "FileNoPass",[1:1:10],0,0
!
open (1)"FileNoPass"
write (1)"test","some data"
close (1)
!
! create a file with a password
erase "FileWithPass",err=*next
keyed "FileWithPass",[1:1:10],0,0
!
open lock (1)"FileWithPass"
password (1)"secret" required for open and on data
write (1)"test","some data"
close (1)
!
! process list of files
for filename$ from "FileNoPass,FileWithPass,MissingFile,"
!
print "processing filename: ",filename$
!
filechan=unt; open input (filechan,key="",err=*next)filename$
if tcb(2) then if err=12 then print " *** file ",filename$," is missing."
!
close (filechan)
!
next
Regards,
Rob Leighton