Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connecting to FTP servers NOT in the connection directory

Status
Not open for further replies.

juski

Technical User
Jun 18, 2003
5
GB
Hi.

I am trying to write a script which goes through a list of IP addresses and uploads a file to each in turn.

The IP addresses will change from time to time in blocks of 20 or so.

Apart from using ASPECT to make a new directory entry for every IP address, is there any way to FTP to an address which does not have an entry in the connection directory?

Thanks in advance,

Justin.
 
Here's a script that shows how to navigate the Manual Connection dialog in FTP mode so you can make a connection without using the Connection Directory:

proc main
string sAddress
string sUsername
string sPassword

sendkey ALT 'P'
mspause 50
sendkey 'M'
mspause 50
sendkeystr sAddress
sendkeystr "`t"
sendkeystr sUsername
sendkeystr "`t"
sendkeystr sPassword
sendkeystr "`t"
sendkey ALT 'O'
endproc

aspect@aspectscripting.com
 
Forgot to mention, your script will either need to prompt for sAddress, sUsername, and sPassword or you'll need to initialize those variables in the script before trying to connect. It also wouldn't hurt to add

while $DIALING
yield
endwhile

after the sendkey ALT 'O' command so the rest of your script waits until the connection has been established.


aspect@aspectscripting.com
 
Thanks for that, Knob :)

I had a major brainwave and came up with a script which used one directory entry and changed its IP address settings. Thanks for stepping in all the same, fella!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top