Advertisement

09.11.2007 at 11:34AM PDT, ID: 22821340
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.0

URGENT PLEASE - Windows FTP.exe command line - How to  Download entire Folder

Asked by dleads in FTP Servers, Microsoft Access Database

Tags: , , , ,

I am trying to use this FTP Access example.  It works GREAT for single files.  But I need to copy the entire folder down.  Does anyknow know how to do that in a command line?
The demo is here... http://www.databasejournal.com/features/msaccess/article.php/3513061

I think the change needs to be made in here...
Public Function DownloadFTPFile(ByVal sFile As String, sSVR As String, sFLD As String, sUID As String, sPWD As String) As String

   Dim sLocalFLD As String
   Dim sScrFile As String
   Dim sTarget As String
   Dim iFile As Integer
   Dim sExe As String

   Const q As String = """"

   On Error GoTo Err_Handler
   DoCmd.Hourglass True
   sLocalFLD = CurrentProject.Path & "\" & sFLD

   ' will break if empty folder exist so error to pass
   ' must create folder first, so API calls work
   On Error Resume Next
   If Dir(sLocalFLD & "\") = "" Then MkDir (sLocalFLD)
   On Error GoTo Err_Handler

   sScrFile = sLocalFLD & "\download.scr"
   If Dir(sScrFile) <> "" Then Kill sScrFile
   sTarget = q & sLocalFLD & "\" & sFile & q
   Debug.Print "Target:" & sTarget
   sFile = q & sFile & q
   Debug.Print "Folder: " & sFLD 'sFile
   ' Open a new text file to hold the FTP script and load it with
   ' the appropriate commands.  (Thanks Dev Ashish !!!)
   iFile = FreeFile
   Open sScrFile For Output As iFile
   Print #iFile, "open " & sSVR
   Print #iFile, sUID
   Print #iFile, sPWD
   Print #iFile, "cd " & sFLD
   Print #iFile, "binary"
   Print #iFile, "lcd " & q & sLocalFLD & q
   'Print #iFile, "get " & sFile & " " & sTarget 'gets one file
   Print #iFile, "mget " & sFile & " " & sTarget 'sFile & " " & sTarget
'*******************I changed to mget from get to try and get the entire folder
   Print #iFile, "bye"
   Close #iFile

   sExe = Environ$("COMSPEC")
   sExe = Left$(sExe, Len(sExe) - Len(Dir(sExe)))
   sExe = sExe & "ftp.exe -s:" & q & sScrFile & q 'just one file
    ShellWait sExe, vbHide
   DoEvents


Exit_Here:
   DownloadFTPFile = GetFileText(sScrFile)
   DoCmd.Hourglass False
   Exit Function
Err_Handler:
   MsgBox Err.Description, vbExclamation, "E R R O R"
   Resume Exit_Here
End Function

Thank you in advance.Start Free Trial
 
Keywords: URGENT PLEASE - Windows FTP.ex…
 
Loading Advertisement...
 
[+][-]09.11.2007 at 11:45AM PDT, ID: 19871128

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: FTP Servers, Microsoft Access Database
Tags: ftp, command, folder, download, line
Sign Up Now!
Solution Provided By: jkr
Participating Experts: 1
Solution Grade: B
 
 
[+][-]09.11.2007 at 11:45AM PDT, ID: 19871131

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]09.11.2007 at 12:14PM PDT, ID: 19871345

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.11.2007 at 12:17PM PDT, ID: 19871364

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]09.11.2007 at 12:17PM PDT, ID: 19871368

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]09.11.2007 at 12:22PM PDT, ID: 19871416

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.13.2007 at 10:09AM PDT, ID: 19885385

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-42 / EE_QW_1_20070628