DEFINE VARIABLE ch-File-Info AS CHARACTER EXTENT 3 NO-UNDO.
See code below.
The below code will look in my directory and disp message 'file received' if there is a *.diff* file in my directory, however when I do not have a .diff file in my directory the code displays nothing. I need it to display 'File Not Received' when there is not that type of file in my directory. Please help!
INPUT STREAM file FROM OS-DIR("/x/see/") no-echo.
REPEAT:
IMPORT STREAM file ch-File-Info.
IF ch-File-Info[3] NE "F" THEN NEXT.
IF (ch-File-Info[1] matches "*.diff*") = false THEN NEXT.
DO.
IF ch-File-Info[1] <> "" THEN
Message "File Received".
ELSE
Message 'File not received'.
END.
END.
See code below.
The below code will look in my directory and disp message 'file received' if there is a *.diff* file in my directory, however when I do not have a .diff file in my directory the code displays nothing. I need it to display 'File Not Received' when there is not that type of file in my directory. Please help!
INPUT STREAM file FROM OS-DIR("/x/see/") no-echo.
REPEAT:
IMPORT STREAM file ch-File-Info.
IF ch-File-Info[3] NE "F" THEN NEXT.
IF (ch-File-Info[1] matches "*.diff*") = false THEN NEXT.
DO.
IF ch-File-Info[1] <> "" THEN
Message "File Received".
ELSE
Message 'File not received'.
END.
END.