If it's internal, why do you need FTP?
Thanks Vovka for wget but is it possible in LISP ?i don't know any means to do this without extra components
wget --no-remove-listing ftp://ftp.opera.com/pub/opera/win/1218/en/
wget will create file .listing in its folder
just read it and parse the contents
get it http://gnuwin32.sourceforge.net/packages/wget.htm
Following example can be used :
ftp://ftp.opera.com/pub/opera/win/1218/en/
[1] site list
[1] 550 Permission denied.
(defun c:testFTP (/ bpth pth2 ftp ftpp usrn pswd fl wscript cmd exec res rtn)
(setq bpth "c:\\users\\philk\\"
pth2 "c:\\users\\philk\\documents\\"
ftp "ftp.opera.com"
ftpp "/pub/opera/win/1218/en/"
usrn "anonymous"
pswd "myemail@email.com"
)
(setq fl (open (strcat bpth "FTP.BAT") "w"))
(write-line "REM Set the working path" fl)
(write-line (strcat "cd " pth2) fl)
(write-line "" fl)
(write-line "REM Write a Script to run the FTP commands" fl)
(write-line (strcat "echo open " ftp "> runftp.txt") fl)
(write-line (strcat "echo user " usrn " " pswd ">> runftp.txt") fl)
(write-line (strcat "echo cd " ftpp ">> runftp.txt") fl)
(write-line (strcat "echo dir -r " pth2 "ftpdir.txt>> runftp.txt") fl)
(write-line "echo bye>> runftp.txt" fl)
(write-line "" fl)
(write-line "REM Launch FTP and pass it the script" fl)
(write-line "ftp -n -s:runftp.txt" fl)
(write-line "" fl)
(write-line "REM Clean up." fl)
(write-line "del runftp.txt" fl)
(close fl)
(if (setq wscript (vlax-create-object "WScript.Shell")
cmd (findfile (strcat bpth "FTP.BAT"))
)
(progn
(setq exec (vlax-invoke wscript 'Exec cmd))
(while (and exec (= 0 (vlax-get-property exec 'Status)))
(princ (strcat "\rWaiting for Program \"" cmd "\"..."))
)
(mapcar 'vlax-release-object (list exec wscript))
)
)
(if (setq res (findfile (strcat pth2 "ftpdir.txt")))
(progn
(setq fl (open res "r"))
(while (setq ln (read-line fl))
(princ (strcat "\n" ln))
(setq rtn (reverse (cons ln (reverse rtn))))
)
(close fl)
)
)
(princ "\n\n")
rtn
)
did you tried to map a simple drive to the FTP site with windows..and then....read the file normaly ?