[AccessD] [dba-Tech] FTP

Roberto Ford Long rford at terra.com.br
Sat May 6 08:45:31 CDT 2023


Rocky,
I know that you are looking for a simple solution.
Try Home of wput (sourceforge.net) <https://wput.sourceforge.net/>
It's a small .exe with a lot of command line options and no need to 
install anything.
A little more complex, but more complete, with all security options, 
output logs...
In my scenario, I created a one line .bat file with all parameters and 
put all together on work folder...
And some day if you need to ftp download use wget.
Best regards from São Paulo, Brasil.
Roberto.

Em 05/05/2023 18:00, Rocky Smolin escreveu:
> Stuart Sorry to say - no cigar. But there's a lot of things I could be
> doing wrong. If it can be done without them having to load and install
> another program that would be desirable - that's why I chose the windows
> FTP.exe
>
> I'll send you the credentials off line.
>
> Thanks again.
>
> r
>
> On Thu, May 4, 2023 at 4:44 PM Stuart McLachlan<stuart at lexacorp.com.pg>
> wrote:
>
>> Try this replacement function in the  demo sent earlier.
>>
>> You need to add another field in usysWeb named WinSCPProg
>> It should contain something like:
>> C:\Program Files (x86)\WinSCP\WInSCP.exe
>>
>> If it doesn't work, can you email me the crendentials for your PureFTPd
>> server and I'll try to
>> work out what is happening.
>>
>> Function FTPPut(Directory As String, Filename As String) As Boolean
>> Const q As String * 1 = """"
>> Dim strEXE As String
>> Dim strLocalDir As String
>> Dim strFName As String
>> Dim strList As String
>> If Dir(Filename) = "" Then
>>     MsgBox Filename & " not found!"
>>     Exit Function
>> End If
>> strLocalDir = Left$(Filename, InStrRev(Filename, "\") - 1)
>> If Len(strLocalDir) = 2 Then strLocalDir = strLocalDir & "\"
>> strFName = Mid$(Filename, InStrRev(Filename, "\") + 1)
>> strList = CurrentProject.Path & "\ftpcmds"
>> Open strList For Output As #1
>> Print #1, "open ftp://" & DLookup("Login", "usysWEB") & ":" &
>> DLookup("PW", "usysWEB") &
>> "@" & DLookup("Site", "usysWEB")
>> Print #1, "cd " & Directory
>> Print #1, "lcd " & strLocalDir
>> Print #1, "binary"
>> Print #1, "put " & q & strFName & q
>> Print #1, "bye "
>> Close #1
>> strEXE =  q & DLookup("WinSCPProg", "usysWeb") & q & " /console /ini=nul
>> /script=" & q &
>> strList & q
>> ShellWait strEXE, vbNormalFocus  'vbHide
>> End Function
>>
>> If you want to see what is going on, comment out the Print #1, "bye" and
>> enter "bye" manually
>> in the CLI once you have examined what is happening.
>>
>>
>>
>> On 4 May 2023 at 16:01, Rocky Smolin wrote:
>>
>>> Thank you. I have very little hair left.
>>>
>>> On Thu, May 4, 2023 at 3:47PM Stuart McLachlan
>>> <stuart at lexacorp.com.pg>  wrote:
>>>
>>>> On 4 May 2023 at 15:22, Rocky Smolin wrote:
>>>>
>>>>> Can WINSCP be used inside of an Access program?
>>>>>
>>>> Yes, see
>>>> https://winscp.net/eng/docs/scripting
>>>>
>>>> Combine it with the SHellWait code in the FTP demo I sent
>>>> previously.   :)
>>>>
>>>> Actually, given the issues you are having, I think I'll build  a
>>>> version that uses WinSCP before I run into the same problem in the
>>>> future.
>>>>
>>>> Stand by!
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> AccessD mailing list
>>>> AccessD at databaseadvisors.com
>>>> https://databaseadvisors.com/mailman/listinfo/accessd
>>>> Website:http://www.databaseadvisors.com
>>>>
>>> --
>>> AccessD mailing list
>>> AccessD at databaseadvisors.com
>>> https://databaseadvisors.com/mailman/listinfo/accessd
>>> Website:http://www.databaseadvisors.com
>> --
>> AccessD mailing list
>> AccessD at databaseadvisors.com
>> https://databaseadvisors.com/mailman/listinfo/accessd
>> Website:http://www.databaseadvisors.com
>>


More information about the AccessD mailing list