11-26-2018 10:58 AM
Hello,
I am trying to figure out how to use a File Poller to make a file name a variable and then to use that variable as the file to use in a File Reader? I am not sure on how to get it to work. Also, how does the File Poller truly work if I have multiple files with the same name, but different timestamps, does it go through them 1 by 1? or all 3 at the same time for example? I using a file that is on an FTP server, and is dynamic with a time stamp, and there could be multiple files but with different timestamps.
11-26-2018 08:56 PM
If you validate the Pipeline - File Poller Snap should return the o/p. Something like this
o/p
“path”: “ftp://XX.XX.XX.XX/HousingPhotos1_FullFeed.zip”
“path”: “ftp://XX.XX.XX.XX/HousingPhotos1_FullFeed.zip”
“path”: “ftp://XX.XX.XX.XX/HousingPhotos1_FullFeed.zip”
The in the File Reader Snap - File* Just pass $path.
11-26-2018 11:41 PM
Hi Falleur,
I would suggest use directory browser over file poller if integration type is scheduled. Once you read file from directory browser you can found the path variable as a output , you can use it on file reader.
11-27-2018 07:03 AM
Can you please show me an example of what you mean?
11-27-2018 09:03 AM
Okay I have that working correctly, one last question how do you get a timestamp to be populated on the end of a file?
11-27-2018 09:17 AM
File Writer Snap - File property* ‘sample’+Date.now().toLocaleDateTimeString({“format”:“yyyy-MM-dd HH:mm”})+‘.json’
For Reference.
https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1439344/Date+Functions+and+Properties