- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
I've got a fortran code running on a PC that needs to access a data file residing on Unix machine. Is there a way to make a call to the FTP command within the fortran code in order to read the data? I tried using FTPOPENFILE win32 command but it dosen't work.
Thanks a lot
I've got a fortran code running on a PC that needs to access a data file residing on Unix machine. Is there a way to make a call to the FTP command within the fortran code in order to read the data? I tried using FTPOPENFILE win32 command but it dosen't work.
Thanks a lot
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What went wrong with FtpOpenFile? Seems that should work.
James
James
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you initialize FTP session correctly? Here's an excerpt (from an untested code):
You should use hConnect later as an argument to FtpOpenFile.
INTEGER:: hSession, hConnect
hSession = InternetOpen(CHAR(0), INTERNET_OPEN_TYPE_PRECONFIG, CHAR(0), CHAR(0), 0) !
hConnect = InternetConnect(hSession, "ftp://ftp.geocities.com"C, INTERNET_DEFAULT_FTP_PORT, &
"username"C, "password"C, INTERNET_SERVICE_FTP, 0, 0)
You should use hConnect later as an argument to FtpOpenFile.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page