Open up ftp file in script

FTP, SFTP, FTPS, and SSH/telnet console issues

Open up ftp file in script

Postby bayin » Tue Jun 30, 2009 1:09 pm

Hi,

I tried to open a ftp file using following script but never got a success, please help

Code: Select all
UltraEdit.open("FTP::username:password@mysite.on.ca\\\\/dir1/dir2/dir3/interface|interface.cfg");


Also I have tried this one:

Code: Select all
UltraEdit.open("FTP::username:password@ftp://mysite\\/dir1/dir2/dir3/interface/interface.cfg");


Not luck either....

Thanks...
bayin
Newbie
 
Posts: 4
Joined: Tue Jun 30, 2009 1:01 pm

Re: Open up ftp file in script

Postby jorrasdk » Wed Jul 01, 2009 2:05 am

I agree the UE help on UltraEdit.open can be a little misleading letting you think you can specify a URL directly:
UE help wrote:UltraEdit.open("FTP::myserver.com\\/home/mypath/public_html|index.html");


You cannot directly in the open() method specify a full FTP path with user, password, server and path. First you have to enter into the UE account manager File - FTP/Telnet - FTP account manager... and create a new account for your site.

For example name it MYSITE and enter server, user, password and other relevant details.

Then in your script you open files using this account name instead of server:

Code: Select all
UltraEdit.open("FTP::MYSITE\\/dir1/dir2/dir3/interface|interface.cfg");


The advantage is clearly that usernames, passwords, IP-numbers/URLs and other stuff which is sensitive and/or subject to change is not kept in the scripts
User avatar
jorrasdk
Master
Master
 
Posts: 275
Joined: Mon Mar 19, 2007 11:00 pm
Location: Denmark

Re: Open up ftp file in script

Postby bayin » Thu Jul 02, 2009 9:11 am

It works great, thanks!
bayin
Newbie
 
Posts: 4
Joined: Tue Jun 30, 2009 1:01 pm


Return to FTP/SFTP / SSH/Telnet