HP3000-L Archives

September 2001, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Peter Chong <[log in to unmask]>
Reply To:
Peter Chong <[log in to unmask]>
Date:
Sat, 15 Sep 2001 10:17:44 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (48 lines)
[log in to unmask] (Peter Chong) wrote in message news:<[log in to unmask]>...
> Raymond Familar <[log in to unmask]> wrote in message news:<[log in to unmask]>...
> > I have used Reflection to "record" ftp actions and create a script that
> > will login (prompting for userid/password), and pass the file.  Some else
> > mentioned how to get ftp from Excel.
>
> Link Excel to MS Access and add this routine in the Access VBA
> http://www.mvps.org/access/modules/mdl0015.htm
>
> Peter Chong
> Sr. ERP Analyst VB/Oracle

I found another example of VBA code.

Sub Ftp()
Open "C:\Temp\temp.tmp" For Output As #1
Close #1
'''Construct the batch file
Open "C:\Temp\ftpfile.bat" For Output As #2
    Print #2, "ftp -n -s:C:\Temp\ftpfile.txt"
    Print #2, "@echo y| del C:\Temp\temp.tmp"
    Print #2, "Exit"
Close #2
'''Contruct the FTP instruction file
Open "C:\Temp\ftpfile.txt" For Output As #3
    Print #3, "open SERVER"
    Print #3, "user USERNAME"
    Print #3, "PASSWORD"
    Print #3, "get //BLAH/file.fil"
    Print #3, "close"
    Print #3, "bye"   '''Switches back to dos shell
Close #3
'''Run the batch file, hidden
Call Shell("C:\Temp\ftpfile.bat", vbHide)
Do
Loop While Dir("C:\Temp\temp.tmp") <> ""
Kill "c:\Temp\ftpfile.bat"
Kill "c:\Temp\ftpfile.txt"
MsgBox "Complete!"
End Sub


Peter Chong
Sr. ERP Analyst VB/Oracle

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2