There is a 18 char limititaion on the use of APP QUERY and it does not work on a folder with a space int the name, so what you have to do is create a MAP then APP QUERY to the PATH you created.
I use APP QUERY to check about 100 files & folders then create a database of this output then 24 hrs later run another APP QUERY that compares the old data base to the new data and if any changes was made on date or time due to an update the file will show on an my reports
APP MAP CAT E:\ibi\srv71\home\catalog
APP PATH CAT
APP QUERY CAT HOLD
APP HOLD AUDIT_CHECK
FILEDEF CATALOG1 DISK E:\AUDIT_CHECK\CATALOG1.DAT
DEFINE FILE FOCAPPQ
FILETYPE/A3=GETTOK(FILENAME,70,2,'.',3,'A3');
RMSL/A8=EDIT (DATE, '99$99$9999');
READDATE/YYMD=DATECVT(RMSL,'A8DMYY','YYMD');
FOLDER1/A18 = 'E:\IBI\SRV71\HOME\';
FOLDER2/A60 = FOLDER1|APPNAME;
FILENAME/A70=UPCASE(70, FILENAME, 'A70');
APPNAME/A18=UPCASE(18, APPNAME, 'A18');
-*FOLDER2/A79 = FOLDER|FILENAME;
-*< TO CREATE THE FOLDER LIST/FILENAME SO THEY COULD BE COPIED AND PASTED IN THE REPORT
TODAY/MDYY = &MDYY
END
TABLE FILE FOCAPPQ
-*WHERE FILENAME CONTAINS '.fex' OR '.FEX'
WHERE FILENAME CONTAINS '.'
-*WHERE FILENAME OMITS '.'
-*< TO PULL THE FOLDER NAMES SO THEY COULD BE COPIED AND PASTED IN THE REPORT FROM EXCEL OUTPUT
PRINT
FILENAME
READDATE AS 'ORG_DATE'
TIME AS 'ORG_TIME'
SIZE AS 'ORG_SIZE'
FOLDER2 AS 'ORG_LOCATION'
TODAY AS 'OLD_TODAY'
AND COMPUTE
NOWTIME/A8 = HHMMSS(NOWTIME); AS 'OLD_NOWTIME'
ON TABLE HOLD AS CATALOG1 FORMAT ALPHA
-*ON TABLE PCHOLD FORMAT EXL2K
END
after a match of old and new i compare the 2 database for a change
COMPUTE
CHANGED/I1 = IF ORG_DATE NE NEW_DATE THEN 1 ELSE
IF ORG_TIME NE NEW_TIME THEN 2 ELSE 0;
HEAD_TIME/A8 = IF ORG_DATE EQ ' ' THEN LAST OLD_NOWTIME ELSE OLD_NOWTIME;
HEAD_DATE/MDYY = IF ORG_DATE EQ ' ' THEN LAST OLD_TODAY ELSE OLD_TODAY;
CUR_DATE/MDYY = &MDYY;
NOWTIME2/A8 = HHMMSS(NOWTIME); NOPRINT
WHERE TOTAL CHANGED EQ '1' OR '2'
BY FILENAME NOPRINT
ON TABLE HOLD AS HOLD2 FORMAT ALPHA
END
DEFINE FILE HOLD2
-* -1 counts from right to left at end, anything ge to 0 counts from left to right the number of beganning
FILETYPE/A3=GETTOK(FILENAME,70,-1,'.',3,'A3');
END
Chuck
Prod: WebFOCUS 7.1, 7.13, 7.6
Test: DevStudio 7.1, 7.6 Servlet - Self Service - MS Windows XP SP2 - Apache Tomcat 5.0.28
Output: HTML, Excel 2000 and PDF