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

Copying a file to FTP site

Status
Not open for further replies.

DougHomeOffice

Programmer
Oct 31, 2001
37
0
0
US
Getting an error Bad File name.

I'm trying to copy a file from my computer to an FTP site
Is this possible how can i automate

--------------------------------------
Dim stDocName As String
Dim SourceFile, DestinationFile

SourceFile = "MyComputerPath\MyAccessFile.mdb" ' Define source file name.
DestinationFile = "ftp://username:password@domain.com/FolderAtSite/MyAccessFile.mdb" ' Define target file name.

FileCopy SourceFile, DestinationFile ' Copy source to target.
-------------------------
 
0Not sure if this helps but - I am doing the same sort of thing. the sysntax I use - that works is:-

datenow = datenow + rand & ".csv"
FileName = "FTP:\\ftp.yourftpsite.com\" + datenow
DoCmd.TransferText acExportDelim, , "FTPManifest", FileName, True

So I think you are missing the second ftp...
FTP:\\FTP.yourftpsite.com

Hope it helps
 
ftp://username:password@domain.com/FolderAtSite/MyAccessFile.mdb

I tried:

ftp://username:password@ftp.domain.com/FolderAtSite/MyAccessFile.mdb

same error
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top