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!

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

Tags: ftp, command, folder, download, line
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 your free trial to view this solution
Question Stats
Zone: Software
Question Asked By: dleads
Solution Provided By: jkr
Participating Experts: 1
Solution Grade: B
Views: 95
Translate:
Loading Advertisement...
09.11.2007 at 11:45AM PDT, ID: 19871128

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
09.11.2007 at 11:45AM PDT, ID: 19871131

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
09.11.2007 at 12:14PM PDT, ID: 19871345

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
09.11.2007 at 12:17PM PDT, ID: 19871364

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
09.11.2007 at 12:17PM PDT, ID: 19871368

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
09.11.2007 at 12:22PM PDT, ID: 19871416

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
09.13.2007 at 10:09AM PDT, ID: 19885385

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080236-EE-VQP-29 / EE_QW_1_20070628