Hi @sameer ,
Setting the download to folder using an attribute value makes the OneDriveConnector parameters valid. If you had an invalid path as one of the "DownloadLocation" attribute values, I'd expect the OneDriveConnector to send that feature to the rejected port. Are you able to confirm whether the file will still download or if it is rejected?
Hi @sameer ,
Setting the download to folder using an attribute value makes the OneDriveConnector parameters valid. If you had an invalid path as one of the "DownloadLocation" attribute values, I'd expect the OneDriveConnector to send that feature to the rejected port. Are you able to confirm whether the file will still download or if it is rejected?
Hi @chrisatsafe
If "Download to Folder" is set for instance to "E:\\FME Workbench\\JWS\\Abc\\", knowing that "Abc" folder does not exist then that folder is automatically created which I do not want as well as the file being downloaded to that new location.
Hi @chrisatsafe
If "Download to Folder" is set for instance to "E:\\FME Workbench\\JWS\\Abc\\", knowing that "Abc" folder does not exist then that folder is automatically created which I do not want as well as the file being downloaded to that new location.
I see, it sounds like you're going to need to check if that directory exists before passing the downloadlocation attribute value into the OneDriveConnector.
You can check with a FeatureReader before the OneDriveConnector by setting the format to Directory and File Pathnames and the dataset to the downloadlocation attribute.
Next, connect the Initiator port to the OneDriveConnector - anything that comes out of the initiator port indicates that the path exists, anything that comes out of the rejected port indicates that the path does not exist. At this point, if you still want to download the rejected features, you could change the path value of the downloadlocation attribute using an attributemanager/other.
Hi @chrisatsafe
If "Download to Folder" is set for instance to "E:\\FME Workbench\\JWS\\Abc\\", knowing that "Abc" folder does not exist then that folder is automatically created which I do not want as well as the file being downloaded to that new location.
That's exactly what I've done already to overcome this problem.
Just want to know why the transformer would not reject:
1) An invalid download location
2) Create the folder instead if it does not exist
Hi @chrisatsafe
If "Download to Folder" is set for instance to "E:\\FME Workbench\\JWS\\Abc\\", knowing that "Abc" folder does not exist then that folder is automatically created which I do not want as well as the file being downloaded to that new location.
A path that does not exists is not invalid in FME's eyes. Workbench isn't checking for existing paths and has the ability to create folders for this reason; this makes fanouts possible.
The only reason you'd see features being rejected would be if you were trying to write to a non existent drive as FME will not create drive partitions.
Hi @chrisatsafe
If "Download to Folder" is set for instance to "E:\\FME Workbench\\JWS\\Abc\\", knowing that "Abc" folder does not exist then that folder is automatically created which I do not want as well as the file being downloaded to that new location.
I'll bear this in mind as the transformer is doing this by design.
Thanks for your help.