Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««123

Unable to Send Files to FTP Server Expand / Collapse
Author
Message
Posted Wednesday, July 8, 2009 2:09 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, November 19, 2013 10:51 PM
Points: 16, Visits: 120
1) Make Sure your remote path actually exists. I got this error because I was pointing to a subdirectory that someone had subsequently removed.

2) Use the format /DIR/SUBDIR/SUBDIR for your RemotePath.

3) You can't have spaces in your directory names. Maybe you can with a remote path variable, haven't tried it.
Post #749567
Posted Friday, February 26, 2010 9:36 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, October 17, 2012 7:51 AM
Points: 14, Visits: 66
Hello,

exactly i used same above code to send a file to FTP server.But my script task remains in execution mode all the time ( Yellow ).
can any please suggest wat happening in my code . I have tested my FTp connection in Script task as well as in FTP connection manger : working perfectly

Imports System
Imports System.Data
Imports System.Math
Imports Microsoft.SqlServer.Dts.Runtime

Public Class ScriptMain



Public Sub Main()



Try

Dim cm As ConnectionManager = Dts.Connections.Add("FTP")

cm.Properties("ServerName").SetValue(cm, "S-SQL15.apollo.zeus.internal")

cm.Properties("ServerUserName").SetValue(cm, "FTPUser")

cm.Properties("ServerPassword").SetValue(cm, "ftpconnection@123")

cm.Properties("ServerPort").SetValue(cm, "21")

cm.Properties("Timeout").SetValue(cm, "0")

cm.Properties("ChunkSize").SetValue(cm, "1000") '1000 kb

cm.Properties("Retries").SetValue(cm, "1")

Dim ftp As FtpClientConnection = New FtpClientConnection(cm.AcquireConnection(Nothing))

'Connects to the ftp server
ftp.Connect()



Dim files(0) As String

files(0) = "C:\TestFtp.txt"

ftp.SendFiles(files, "/", True, False)

ftp.Close()

Catch ex As Exception

Dts.TaskResult = Dts.Results.Failure

End Try

Dts.TaskResult = Dts.Results.Success



End Sub

End Class
Post #873539
Posted Wednesday, March 21, 2012 2:00 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, January 31, 2013 4:02 PM
Points: 69, Visits: 539
If you are able to transfer manually ,try using passive mode on ftp manager. Enable the logging for the client you are using to transfer manually for any additional settings.
Post #1270483
Posted Thursday, August 9, 2012 4:50 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, September 29, 2014 9:39 AM
Points: 6, Visits: 63
You may need to set your destination folder to the following:

/myaccountname/dir/subdir/subdir/
(where "myaccountname" is your login to the FTP site.)


Instead of just:

/dir/subdir/subdir/


This worked for me and stopped the following error:
Unable to send files using "FTP".

Donna



Post #1343072
Posted Thursday, August 9, 2012 4:52 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, September 29, 2014 9:39 AM
Points: 6, Visits: 63
You may need to set your destination folder to the following:

/myaccountname/dir/subdir/subdir/
(where "myaccountname" is your login to the FTP site.)


Instead of just: /dir/subdir/subdir/

This worked for me and stopped the following error: Unable to send files using "FTP".

Donna



Post #1343074
Posted Tuesday, July 30, 2013 4:34 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, October 14, 2014 2:28 AM
Points: 5, Visits: 96
Hi Guys...need help in ftp..
my local folder has 100 files and each day files are added to this local folder has date and time in the file name as abc_2013.07.30.12.00.tmp , I want to send the latest file to ftp server using ssis package ??is this possible ???

Any help pls ????
Post #1478911
Posted Monday, April 7, 2014 2:12 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Tuesday, November 11, 2014 1:19 PM
Points: 354, Visits: 212
When I set "Use Passive Mode" in connection manager, it worked! (but FTP Task is not helpful since it's saying Password is not allowed).

Suresh
Post #1559267
« Prev Topic | Next Topic »

Add to briefcase «««123

Permissions Expand / Collapse