Need help w/ File Poller to File Operation

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—>image

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.

Have you tried an expression like


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.