Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

FTP files from Access

Avatar of d10u4v
d10u4vFlag for United Kingdom of Great Britain and Northern Ireland asked on
Microsoft Access
2 Comments1 Solution1272 ViewsLast Modified:

I have this code (see example).  I was hoping that it would upload the files in  C:\Documents and Settings\Desktop\TestFolder\email



However, nothing happens.  Could someone please advise me as to where i'm going wrong...

Public Sub FTPFiles()
    Dim iHandle As Integer
    Dim sFTPFile As String
On Error GoTo ClearUp
    'Set path to temp file
    sFTPFile = "C:\Documents and Settings\Desktop\TestFolder\temp\myftp.txt"
    'Open file
    iHandle = FreeFile
    Open sFTPFile For Output As #iHandle
    Print #iHandle, "OPEN ftp.myaddress.co.uk"
    Print #iHandle, "myusername"
    Print #iHandle, "mypassword"
    Print #iHandle, "cd /var/www.html/email"
    Print #iHandle, "lcd C:\Documents and Settings\Desktop\TestFolder\email"
    Print #iHandle, "mput *.*"               'copy all files from local to remote
    Print #iHandle, "bye"
    Close iHandle
    Shell ("ftp -s:" & sFTPFile)
    If Dir$(sFTPFile) <> "" Then Kill sFTPFile
End Sub
Avatar of d10u4v
d10u4vFlag of United Kingdom of Great Britain and Northern Ireland image

Our community of experts have been thoroughly vetted for their expertise and industry experience.

This problem has been solved!
Unlock 1 Answer and 2 Comments.
See Answers