I can't write files to the specified folders via ftp
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
I can't write files to the specified folders via ftp
I can't write files to the specified folders via ftp. And sometimes it works, and sometimes it doesn't. I tried to do it in different ways. And first make the folder current, and then write the file. And immediately record the full path. It used to work, but now it doesn't work. At the same time, what I did before works well.
Re: I can't write files to the specified folders via ftp
You always get a response from a FTP server. Look at this. It will tell you why it works sometimes and sometimes not.
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: I can't write files to the specified folders via ftp
I always check everything: whether it was possible to create a connection, whether it was possible to make a given folder current, whether it was possible to upload or download a file, etc. I check everything absolutely, and if something is wrong, I always give the appropriate reasonable messages. But often the server only gives out .T. or .F.. where can I get more detailed information?
-
- Posts: 484
- Joined: Wed Jan 27, 2010 10:25 pm
- Location: Berlin Germany
Re: I can't write files to the specified folders via ftp
Have you set oFTP:PassiveMode := .T. ?
_______________________
Best Regards
Wolfgang
Best Regards
Wolfgang
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: I can't write files to the specified folders via ftp
No, he didn't. And where and how to do it?
-
- Posts: 484
- Joined: Wed Jan 27, 2010 10:25 pm
- Location: Berlin Germany
Re: I can't write files to the specified folders via ftp
I use the ftp client from Xb2.Net. If you use the XBase++ ftp client look at the FtpClient:connect() description:
:connect(FTP_CONNECT_PASSIVE_MODE)
:connect(FTP_CONNECT_PASSIVE_MODE)
_______________________
Best Regards
Wolfgang
Best Regards
Wolfgang
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: I can't write files to the specified folders via ftp
hi, Wolfgang Ciriack!
I use the xBase++ ftp client. Thanks, I'll try it now.
:
I use the xBase++ ftp client. Thanks, I'll try it now.
:
- Attachments
-
- Безымянный.jpg (89.03 KiB) Viewed 10164 times
-
- Posts: 484
- Joined: Wed Jan 27, 2010 10:25 pm
- Location: Berlin Germany
Re: I can't write files to the specified folders via ftp
you must include "asinet.ch".
_______________________
Best Regards
Wolfgang
Best Regards
Wolfgang
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: I can't write files to the specified folders via ftp
hi, Wolfgang!
Here is a fragment of the program. It works, but incorrectly. Function: oFtp:Directory() does not see the folder: "htdocs". The function: oFtp:CurDir("\htdocs\messages") cannot make the current folder: "\htdocs\messages" and returns a space.
Here is a fragment of the program. It works, but incorrectly. Function: oFtp:Directory() does not see the folder: "htdocs". The function: oFtp:CurDir("\htdocs\messages") cannot make the current folder: "\htdocs\messages" and returns a space.
Code: Select all
oFtp := FTPClient():new( cFtpServer, cUserName, cPassword ) // Соединение с моим сайтом и авторизация
IF .NOT. oFtp:connect(FTP_CONNECT_PASSIVE_MODE) // Есть соединение с моим сайтом и авторизация?
DC_Impl(oScrn)
LB_Warning('Нет соединения с FTP-сервером', '(С°) "Crypton"')
cOutString = 'Нет соединения с FTP-сервером'
ELSE
wtf oFtp:curDir()
wtf oFtp:Directory() // VALUE: {{"Downloads.exe", 10242016, 20201202, "07:57:00", "N", 0, , "00:00:00", , "00:00:00"}}
wtf oFtp:curDir("\htdocs\messages")
wtf oFtp:Directory() // VALUE: {{"Downloads.exe", 10242016, 20201202, "07:57:00", "N", 0, , "00:00:00", , "00:00:00"}}
- Attachments
-
- Безымянный3.jpg (68.83 KiB) Viewed 10148 times
-
- Безымянный2.jpg (45.79 KiB) Viewed 10149 times
-
- Безымянный.jpg (135.98 KiB) Viewed 10149 times
-
- Posts: 484
- Joined: Wed Jan 27, 2010 10:25 pm
- Location: Berlin Germany
Re: I can't write files to the specified folders via ftp
Try oFtp:curDir("htdocs") (without the backslash at the beginning).
Then aF := oFtp:Directory(). What is the content of aF ?
Then aF := oFtp:Directory(). What is the content of aF ?
_______________________
Best Regards
Wolfgang
Best Regards
Wolfgang