- Local time
- Today, 13:29
- Joined
- Sep 12, 2006
- Messages
- 15,634
VBA code to run an ftp script is failing, but only on some computers.
The script logs in to an ftp site, does an ls to get a file listing, then does an mget * to collect the files
filename is a text file with a sequence of commands for ftp to implement
From the OS prompt this works
ftp -ns:"filename"
from within access this fails (hangs while executing)
shell(ftp -ns:"filename")
it's nothing to do with the syntax of the command. It's formatted correctly, runs, opens a command window and logs in. On some PC's it then completes normally. On others it gets to the first i/o command, echoes it in the command window, but hangs. It hangs at the ls command. If I remove the ls it hangs at the mget * command.
Has anybody got any ideas how to get round this?
Please note that the real code is actually slightly different to this. It actually calls a shell and wait routine to hold further processing until the ftp script completes, but I have just pared it back to this simple "shell" instruction, to just try to get it running, and pinpoint precisely what is causing the problem.
I had the same problem on a different computer, and got around it by using WINSCP instead of ftp, but we would like to solve the problem affecting ftp.
The script logs in to an ftp site, does an ls to get a file listing, then does an mget * to collect the files
filename is a text file with a sequence of commands for ftp to implement
From the OS prompt this works
ftp -ns:"filename"
from within access this fails (hangs while executing)
shell(ftp -ns:"filename")
it's nothing to do with the syntax of the command. It's formatted correctly, runs, opens a command window and logs in. On some PC's it then completes normally. On others it gets to the first i/o command, echoes it in the command window, but hangs. It hangs at the ls command. If I remove the ls it hangs at the mget * command.
Has anybody got any ideas how to get round this?
Please note that the real code is actually slightly different to this. It actually calls a shell and wait routine to hold further processing until the ftp script completes, but I have just pared it back to this simple "shell" instruction, to just try to get it running, and pinpoint precisely what is causing the problem.
I had the same problem on a different computer, and got around it by using WINSCP instead of ftp, but we would like to solve the problem affecting ftp.