cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Error In File Operations Snap

nihil_limbadiya
New Contributor II

HI,

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.?

THanks

1 ACCEPTED SOLUTION

In that case, the input binary data has zero byte. You need to select the boolean property โ€œWrite empty fileโ€ in the File Writer Snap.

View solution in original post

26 REPLIES 26

dmiller
Admin Admin
Admin

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?


Diane Miller
Community Manager

Hi,
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

Hi.
I am trying 2 things

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

image

Also image of the snap of file operations
image

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)