Skip to Content
0
Aug 26, 2009 at 05:22 AM

Get File Names & Creation Time of the files of a directory in App. Server

938 Views

Dear all,

My requirement is to fetch all the file names of a paritucular direcory in the application server. After going through SDN i got some FM's like

1. EPS_GET_DIRECTORY_LISTING

2. EPS_GET_FILE_ATTRIBUTES

3. SUBST_GET_FILE_LIST

Here EPS_GET_DIRECTORY_LISTING looks perfect for my requirement. But while I tried to test the FM from SE37 its giving exception READ_DIRECTORY_FAILED for the required Directory. But the same FM is returning file names for the root directory.

Please look a above 2 scenario...

ie. if I give Export parameter as

DIR_NAME = '/'

FILE_MASK = '*'

The FM works fine.

But . if I give Export parameter as

DIR_NAME = '/XYZ'

FILE_MASK = '*'

The FM returns exception READ_DIRECTORY_FAILED .

But the directory /XYZ exists and there are files in it..Am I missing something with respect to the path am specifying.

Regards,

Antony