NetTalk Central

NetTalk FTP => FTP - Ask For Help => Topic started by: John Fligg on January 03, 2012, 03:29:27 PM

Title: Cannot open file
Post by: John Fligg on January 03, 2012, 03:29:27 PM
I am sending a set of tps files to a server and this has been working fine up until now.

What is happening is that one of the files is empty. It exists as size 2kb but has no records in it. When trying to transfer this file it seems to place it on the server but when I view the file it is corrupt. I suspect FTP does not like transferring files with 0 records,

How can I get round this problem?

BTW I am processing and creating the files to send. In this case I do not even create this file myself but is created by the dictionary and I cannot put dummy records in.

There is nothing special about this and is based on the example and works 100% until there is a file with 0 records.

Thanks

John
Title: Re: Cannot open file
Post by: kevin plummer on January 03, 2012, 04:07:13 PM
Try to Rename or delete the file from the server before transferring the local file.

Or try the above but don't trf the file, let your program create a blank file.
Title: Re: Cannot open file
Post by: Bruce on January 03, 2012, 10:16:40 PM
Hi John,

Obviously to FTP the file is just a binary file, it has no clue if there is data in it or not.

My guess is that when you upload it, the file is held open at either the sending side, or receiving side by another program so the upload fails.

cheers
Bruce
Title: Re: Cannot open file
Post by: John Fligg on January 04, 2012, 09:06:07 AM
Thanks Bruce. It was Clarion opening the files because they are listed in Other Files.

I needed to explicitly close these not realising FTP would be a problem. The reason some failed was because some were beign processed by my code where I was explicitly closing them anyway.

Thanks

John