2008 Dec 16 1:06 PM
Hi!
I couldn't found any function for reading files all attributes.
Size, owner, type, creation date and creation time is ok, but
modify date and creation time is missing.
Function EPS_GET_FILE_ATTRIBUTES is not enough.
LOOP AT dlist.
CALL FUNCTION 'EPS_GET_FILE_ATTRIBUTES'
EXPORTING
file_name = dlist-name
dir_name = dpath
IMPORTING
file_size = fattr-file_size
file_owner = fattr-file_owner
file_mode = fattr-file_mode
file_type = fattr-file_type
file_mtime = fattr-file_mtime
EXCEPTIONS
read_directory_failed = 1
read_attributes_failed = 2
OTHERS = 3.
IF sy-subrc EQ 0.
fattr-file_name = dlist-name.
APPEND fattr.
ENDIF.
ENDLOOP.
SORT fattr BY file_name.
LOOP AT fattr.
point_in_time = fattr-file_mtime.
CALL FUNCTION 'POINT_IN_TIME_CONVERT'
EXPORTING
point_in_time = point_in_time
IMPORTING
date = mdate
time = mtime
EXCEPTIONS
OTHERS = 1.
SUBTRACT days1980 FROM mdate.
WRITE: / fattr-file_name,
fattr-file_size,
fattr-file_owner,
mdate,
mtime.
ENDLOOP.
Thank you your tips.
Viktor David
Hi!
I couldn't found any function for reading files all attributes.
Size, owner, type, creation date and creation time is ok, but
modify date and creation time is missing.
Function EPS_GET_FILE_ATTRIBUTES is not enough.
LOOP AT dlist.
CALL FUNCTION 'EPS_GET_FILE_ATTRIBUTES'
EXPORTING
file_name = dlist-name
dir_name = dpath
IMPORTING
file_size = fattr-file_size
file_owner = fattr-file_owner
file_mode = fattr-file_mode
file_type = fattr-file_type
file_mtime = fattr-file_mtime
EXCEPTIONS
read_directory_failed = 1
read_attributes_failed = 2
OTHERS = 3.
IF sy-subrc EQ 0.
fattr-file_name = dlist-name.
APPEND fattr.
ENDIF.
ENDLOOP.
SORT fattr BY file_name.
LOOP AT fattr.
point_in_time = fattr-file_mtime.
CALL FUNCTION 'POINT_IN_TIME_CONVERT'
EXPORTING
point_in_time = point_in_time
IMPORTING
date = mdate
time = mtime
EXCEPTIONS
OTHERS = 1.
SUBTRACT days1980 FROM mdate.
WRITE: / fattr-file_name,
fattr-file_size,
fattr-file_owner,
mdate,
mtime.
ENDLOOP.
Thank you your tips.
Viktor David
2009 Mar 10 4:16 PM
Hi Victor,
Did you find any FM to get modified date for a file stored in the local drive?
I'm also looking for the same.
Thanks
Thruna Shanmuga
2009 Mar 12 7:37 AM
Hi Thruna!
No I've been fighting for these data's, but without any success. What do you think about to get file attributes from a cmd command (ex. ATTRIB), and export it by a function?
Viktor
2012 Sep 19 12:18 PM
Any other option in order to get the properties to a file longer than tdlist-name (char 40)???
2012 Sep 19 1:38 PM
Hi
I believe the date and time you can get are the last modification
Max
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |