12-05-2018 01:49 PM
Hi, I am trying to use a file poller to look through an ftp directory and find a file, and then using the file operation snap to then send the file to correct directory,
In the file poller i have the correct directory to point to and the file name with a wildcard (‘*’) and the file type.
i.e filename * .txt
Then in the file operation, I have the source: $path
and target location: directory/path/$path
I am getting this error—>
EDIT: I see what I am doing wrong, the path is the whole url of the file, How can I pull just the file from the $path, because the timestamp is always going to be different and post it in the target directory.
12-06-2018 01:46 PM
Have you tried an expression like
$path.split("/").pop()
This will split the path on slashes and then remove the last one off the end of the array, which should be the file name.
02-24-2020 06:06 AM
Hi,
Have you found the solution? if yes, then can you please share it ? thanks