I know there is a File/Directory Reader but I don't want to read the whole directory of files.
I'm trying to find a transformer that I could use in the work flow that exposes file properties ie date created, date modified. Reading a polygon with an attribute "ABC123.PDF" and test with a FME Store FileExistenceChecker filter. If exists get the modified date of "ABC123.PDF" and push in an attribute.
This should be possible with a PythonCaller or TCL but is there a Transformer I missed before I try to write one.
Best answer by takashi
You can use the FeatureReader with the PATH reader to retrieve properties of an existing file.
Assuming that you have a feature which contains two attributes: "_folder_path" (folder path containing the target file) and "_filename" (the target file name).
Format: Directory and File Pathnames (PATH)
Dataset: _folder_path (attribute value)
Attributes to Expose: path_created_date, path_modified_date (and other required properties)
Parameters setting of the PATH reader ([Parameters] button in the FeatureReader parameters dialog)
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.
You can use the FeatureReader with the PATH reader to retrieve properties of an existing file.
Assuming that you have a feature which contains two attributes: "_folder_path" (folder path containing the target file) and "_filename" (the target file name).
Format: Directory and File Pathnames (PATH)
Dataset: _folder_path (attribute value)
Attributes to Expose: path_created_date, path_modified_date (and other required properties)
Parameters setting of the PATH reader ([Parameters] button in the FeatureReader parameters dialog)
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.