Upload file to FTP - exception with new name

Five Stars

Upload file to FTP - exception with new name

Hello,

 

I'm trying to upload files that end with "xls" to a FTP, it works fine if I keep the default name but If i try to chose a new name an exception occurs.

 

My job :

 

tt.pngput.png

For example, if instead of "tr.xls" I type "" the job works fine but I don't want to keep the default name.

 

Here is the error I get :

Exception in component tFTPPut_1 (JS_M03_RECETTES)
4: /data/intametis/./*.xls is not unique: [/data/intametis/./test.xls, /data/intametis/./ventes_2018_20180613.xls, /data/intametis/./ventes_2012_20180613.xls, /data/intametis/./ventes_201806_20180730_.xls]

 

All the files mentioned(ventes_2018_20180613.xls, ventes_2012_20180613.xls, ventes_201806_20180730_.xls) are files already on the FTP, test.xls is the file I want to upload. In the end, the job works because I can find the file on the FTP but I don't understand why there is an exception.

 

I use Talend Open Studio for Data Integration 6.5.1.

 

Thanks in advance.


Accepted Solutions
Thirteen Stars

Re: Upload file to FTP - exception with new name

@AlexFa,yes when your remote directory have few files with same kind of extension and trying put a new file with new file masking it was failing.

if you have not specified file mask for New name then it was working. once you put in FTP,use tFTPRename component to rename the file.

 

 

Manohar B

All Replies
Thirteen Stars

Re: Upload file to FTP - exception with new name

@AlexFa,since you have multiple files in local directory,so you are going to file mask for all files like tr.xls .which will not allow you. so you need to have only one file or you your file mask should be dynamic for each file.

Manohar B
Five Stars

Re: Upload file to FTP - exception with new name

I only have one file in my local directory :

 

localdir.png

Thirteen Stars

Re: Upload file to FTP - exception with new name

@AlexFa,i have tested and working as expect that,you should have a  single file in with .xls format local directory and you should specify Overwrite file option as  Overwrite.

 

i belive your issue will be fixed after changing Overwrite file in Basic settings of tFTPPut.

Manohar B
Five Stars

Re: Upload file to FTP - exception with new name

Thanks for the reply but the tFTPPut is already set on overwrite ("Ecraser" is french for overwrite).

For me the problem come from the FTP but I have no clue why, in the exception message "/data/intametis/" refers to the FTP directory.
Thirteen Stars

Re: Upload file to FTP - exception with new name

@AlexFa,where do you ventes_2018_20180613.xls file in local directory or remote directory ?

Manohar B
Five Stars

Re: Upload file to FTP - exception with new name

The file is in the remote directory, the only file in the local directory is "test.xls"
Thirteen Stars

Re: Upload file to FTP - exception with new name

@AlexFa,yes when your remote directory have few files with same kind of extension and trying put a new file with new file masking it was failing.

if you have not specified file mask for New name then it was working. once you put in FTP,use tFTPRename component to rename the file.

 

 

Manohar B