Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

connecting to an ftp server ans sending a file 1

Status
Not open for further replies.

mortgsteps

Technical User
Apr 19, 2000
19
US
In access 97 I have written code to create an tab delimited ascii file to certain specifications. I need to automatically transfer the text file to an ftp server from within Access using code, a macro whatever.
Can any one help me to do this?
Thanks
 
There is a program I used once called WS_FTP Pro
its an FTP Program that can be controlled with Access using VBA. It costs $37.99

here are a couple of URLS to their site.
they have a Developement kit now too, but its $195.00


Now you have to know VBA real well to utilize this, Cause the information is for Visual Basic.
 
You can use the Microsoft Internet Transfer Control on a form.

Private Sub DOTransfer()

ctl.Protocol = 2 'FTP
ctl.UserName = "" 'using anonymous.
'ctl.Password = ""

ctl.OpenURL "FTP://site.mysite.com"

'change to ftp root
ctl.Excute "FTP://site.mysite.com CD \" 'the root

'transfer file
ctl.Excute "FTP://site.mysite.com PUT C:\source.txt destination.txt"
'done
End Sub

Private Sub ShutDownFTPConnection()
ctl.Cancel
End Sub


'There are some event procedures that can be used to determine the success or failure of the 'PUT' operation.
You'll probably want to see the reference on this.
 
Hi,

I would really like to be able to copy a file to an FTP site. I tried a lot of forums ('cause I tried myself, but just don't know vba enough to do it), but have never been answered...

the code jou give as an example seems to do the job (copying to an ftp site)... but could you tell me how is "ctl" defined?

Thanks a lot for your help,
Bella
 
yes! Several of us out here could use your valuable help!
what do we define the ctl as? an object, etc???

Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top