Skip to main content

 

 

I am trying to use file copy to copy data from a ftp site to network location. For some reasons the backword slashes gets converted to forward slash. Can anyone help to get around it?

 

Thanks 🙂
Looks more like double slashes get converted to single.

 

Is this fme2015?

 

Are you using a concatenation in the creator or reffering to parameters?

 

Use "Show Summary Annotation"
Yes, this is FME 2015. Creator is just blank. 

 

 

Summary annotation shows this:

 

AttributeCreator_4 rAttributeCreator]

 

filecopy_source_dataset = ftp://<user>:<password>@<url>/<fileName.ext>

 

=======

 

Writer Type: File Copy

 

Feature Type: filecopy

 

Dataset: test eFILECOPY]

 

Geometry: All

 

 

Attributes:

 

filecopy_source_dataset: char(512)

 

filecopy_dest_dataset: char(512)

 

filecopy_dest_filename: char(128)

 

filecopy_source_dataset: char(512)

 

 

=============

 

 

Thank you for your help!
Hi,

 

 

URLs should not use backslashes. Try using forward slashes (/) rather than backslashes (\\).

 

 

David
Yes, I have tried forward slash and backslash both. I have also tried 4 slashes but that didn't help. It gives the same error. 

 

It appears to be a bug in FME 2015. If anyone has any suggestion to get past it then that would really help. 
Gio,

 

Thank you for your help! That was a great idea. However, that didn't work! I tried 8 slashes (forward and backward). 

 

 

It takes it properly but then in the next line it removes the slash:

 

 

File Copy Writer: Received copy request from 'ftp:\\\\\\\\<user>:<pwd>\\<fileext>' to 'C:\\Users\\xyz\\AppData\\Local\\Temp\\_auto_zip_dataset_1426095001167_7104\\'

 

 

File Copy Writer: Feature contains an invalid source dataset 'ftp:\\<user>:<pwd>\\<fileext>'. No file operations will be performed for this feature

 

 

 

Thanks!

 

 

 
Hi,

 

 

Looks like the File Copy writer assumes that source and destination datasets are located on the same disk operating system as the running machine. I guess that's why the writer has changed slashes to backslashes implicitly when running on the Windows.

 

If my observation was correct, it could be difficult to copy files from ftp site to other disk system through the writer running on the Windows.

 

Maybe it's better to request Safe's support...

 

 

Takashi
Can you use the transformer FTPCaller on FME2015, or are you using FME2014?
Thanks Takashi and SigTill.

 

I opened a ticket with FME to see if they have a solution. 

 

 

Meanwhile, a combination of using FMECaller, AttributeCreator and FileCopy does the trick. While FMECaller can directly copy to a network location, I need it zipped and that's why I had to use FileCopy transformer.

 

 

I am going to mark SigTill's answer as best answer as it provides a good workaround. 

 

 

Thanks 🙂
I tried using the FTPCaller but I can't seem to read the files in the ftp server.  Has anyone experienced the same thing?  

Reply