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
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
Is this fme2015?
Are you using a concatenation in the creator or reffering to parameters?
Use "Show Summary Annotation"
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!
URLs should not use backslashes. Try using forward slashes (/) rather than backslashes (\\).
David
It appears to be a bug in FME 2015. If anyone has any suggestion to get past it then that would really help.
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!
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
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