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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exporting a file to FTP server

Status
Not open for further replies.

TechnicalAnalysis

Programmer
Jul 2, 2001
169
US
I'd like to export a file from Access Database to a FTP server. Could anyone point me to a direction of how to do this?
I heard that one way to do this is to creat a bat file by Access and run the bat file for transfer. I'm not familiar with bat file. Any direction is appreciated. Or any other way to do this is welcome.
 
I did a research on MSDN and found the following:
I can do a copy and paste from my PC to a virtual folder like FTP server using the Shell.
Private Sub btnCopyHere_Click()
Dim objShell As Shell
Dim objFolder As Folder

Set objShell = New Shell
Set objFolder = objShell.NameSpace("ftp_address_here")

If (Not objFolder Is Nothing) Then
objFolder.CopyHere ("C:\file_On_PC.txt")
End If

Set objFolder = Nothing
Set objShell = Nothing
End Sub

I tried this and I got everything working fine. I can even see the file was transfering and asking if I want to replace the file etc.
When I go back to the FTP server, I can't see the file there.
Does anyone know why?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top