Error In File Operations Snap


I was reading earlier post ppl are having issue with File Operation Snap.

I am having same issue. I am trying to copy/Move file to one location to another.

I have used File POLLER snap to find the file. and using FIle Operation snap but its giving me an error. enough the folder is empty it says file is already there.

Can some one please help me.?


Which protocol are you using? (FTP, SFTP, S3…)

If you are only moving one file, does the Target path specify down to the file name or just the new directory?

With the file poller snap I m getting files from Our server (3 files)and using SFTP I need to transfer them files to another server and move the send files on our server to send folder
I tried using file operations it’s giving error

I am trying 2 things

  1. one Via SFTP
  2. Moving file within our Server :- please find attached error

Also image of the snap of file operations

I’ve forwarded this on to Dev as I’m a bit perplexed by this.

Please have a look at the Snap reference document for File Operation Snap.
Snap Behavior for Key Operations > FTP, SFTP and File Protocols > Copy Operation > S. No. 6

S. No. 6 is a case when Source is a regular file, Target is an empty directory and ‘Error if exists’ is true.
As shown in the table, the expected result is an error “Target already exists.”

You may have expected to copy the source file into the directory specified in the Target property, but the Snap does not work that way. You should build an expression which produces a full path for the target file, e.g. _Destination_Path + $Path.substring($Path.lastIndexOf("/") + 1)

Hi Thanks

All sorted .

Thanks for you help


its working if i am copying file within my network. i am getting error while i am trying to connected to FTP and copy file over to that FTP . please find attached error .

Can you please help me out.?


Hello Nihil,

First, it looks like you’re posting multiple issues into the same thread. Could you please open separate threads for separate issues? That can help keep the threads organized and faster to find answers for anyone else in the future who may have the same issue.

In regards to the most recent screenshot the error is pretty clear that the File Operation snap requires the file to be moving on the same host with the same protocol. If you need to move a file from file://[LOCATION] to ftp://[LOCATION] then you need to use a File Reader and File Writer to make the transition.

ok will makle sure from now on.

regarding the latest post

To get the file i am using Directory Browser snap and to copy file i am using file operation snap. will it not work ?


To move a file from one host to another you need to have the Directory Browser snap feed the file to File Reader then a File Writer. File Operation snap is used when you are moving the file around on the same host. Here is a screenshot of the first three snaps you need:


Thanks for the help i will try with these snaps. will let you know if any issues.



With Directory Browser I have already got the file. can’t i use directly file writer ??

Also, I am trying to move send file to another folder its not working as well

No, Directory Browser is not reading the file, only the metadata about the file including the path. You can also tell because the circular output (meaning it outputs JSON) of the Directory Browser snap does not connect to the diamond input of the File Writer, which requires binary input. You need the File Reader.

Hi Thanks,

i have got access wieredly i am getting access denied messaged when i am trying to read file with file reader

Make sure the file can be read by the account running the Snaplex service. If you need a deeper investigation into that situation please contact our Support team.

File Operation Snap can copy or move files between the same file servers. Source and target should have the same hostname and the same file protocol.
The error message shows that your expression is not valid. It is not readable in the attached image.

FIle Reader works fine and now i am writting file to SFTP with File Writer Snap:-

On the Left is output from file reader and on the right is file writer snap and in account tab i have set up SFTP account.
so, is it possible to check if file was successfuly send to SFTP and also to get output view of the File Writter? as I need to move that send file to Send folder on our server.?
Sorry hope this make sense

I see that the File Writer Snap is not setup to send the file to SFTP.
You must enter the sftp file path and hostname in the File name property of the File Writer Snap. You should not use the content-location value from the File Reader Snap.