Problem with Shelling to ftp

hk1

Registered User.
Local time
Today, 02:21
Joined
Sep 1, 2009
Messages
121
I'm trying to shell using ShellWait and then ftp some files using MoveIt Freely ftps. This all works fine until I add stuff to the end to send the results of the ftp to a text file. At that point the black screen just flashes momentarily.

I'm bringing up the shell string in a message box and typing it in from the command line and it's working perfectly that way. I've double checked for misspellings, wrong passwords, etc. and There is no problem there.

Here's the code:

Code:
sShell = "ftps " & C_sFTPHOST & " -user:" & C_sFTPUSERNAME & " -password:" & C_sFTPPASSWORD & " -s:" & """" & CurrentProject.Path & "\upload" & """" & " > " & """" & CurrentProject.Path & "\logs\" & sStockNo & ".log" & """"
And here's the actual output:
Code:
ftps myremoteserver.com -user:myusername -password:mypassword -s:"S:\inventory pictures\upload" > "s:\Inventory Pictures\logs\50015.log"
The file upload has code in it that looks like this:
Code:
binary
prompt
cd htdocs
cd inventoryimages
passive
cd 50015
mput "S:\Inventory Pictures\50015\*.pdf"
quit

Any ideas why this doesn't work when I use ShellWait and try to send the results to a text file?
 
Looks like I found the problem.

First, as a work-around, I'm now writing a batch file that cd's to the correct directory then runs the ftp string and excludes the formerly necessary quotes around the paths. This brought up a new problem.

A percent in the password started causing something strange to happen where "upload.bat" was in place of the percent when the batch file executed the ftps string. I created a new ftp account and setup a password without a percent sign and now it appears to be working without a hitch.
 

Users who are viewing this thread

Back
Top Bottom