Archived Forum Post

Index of archived forum posts


Check if file exists does not allways work

May 27 '14 at 14:11


My program uploads a file to a FTP server and after the upload it checks if the file is there or not because in the past it happened that the file was not there for a unknown reason. The problem is that on some servers for some strange reason it returns -1 as size instead of the actual size even if the file IS there. could it be a permission setting of the server? is there another way to check if the file is there?




Turn on session logging by setting the KeepSessionLog property = true after the upload, then after getting the size, capture the contents of the SessionLog property. Post it here. This should show whatever commands were sent by Chilkat FTP2 and the responses from the server.


Are you sure that the file on the server is not being worked on. Our ftp servers see that the file has arrived, and start to process, ie on our servers you will get junk returned.


Also another note is that if you get a good return code with this stuff, the file has been transmitted 100%. If the file is not there, then the problem exists on the file server.