Need help in not fetching a file while it is being used [message #551396] |
Tue, 17 April 2012 22:06 |
world.apps
Messages: 70 Registered: January 2007 Location: Hyderabad
|
Member |
|
|
Hi All,
We have a host program in oracle when we run this program this connects to specified ftp and will get the file into local server.
We are facing a problem like when file in ftp server is in writing mode/not completed yet, this program is getting the incomplete file.
Could anyone please help me how to control this.
Thanks in advance.
[Updated on: Tue, 17 April 2012 22:08] Report message to a moderator
|
|
|
|
|
|
|
Re: Need help in not fetching a file while it is being used [message #551855 is a reply to message #551396] |
Sat, 21 April 2012 09:31 |
world.apps
Messages: 70 Registered: January 2007 Location: Hyderabad
|
Member |
|
|
Hi All,
Thanks for your help. As per the BlackSwan note we requested the third party to add a line at the end of the file to achive this requirment. But they are not willing to add anything to the file.
I tried with the commands provided by LKBrwn_DBA but it appears to be this may fail in some cases. Can you please correct me if my below assumptions are wrong.
Quote:
ftp> get myfile.txt myfile.txt.busy
this is transfering the file to unix server with different file name.
ftp> !mv myfile.txt.busy myfile.txt
this is moving the file to unix server by changing the file name. But i suspect this may happen while file is being used/written.
ftp> bye
Thanks
[Updated on: Sat, 21 April 2012 11:41] by Moderator Report message to a moderator
|
|
|
|
|
|
Re: Need help in not fetching a file while it is being used [message #551881 is a reply to message #551862] |
Sat, 21 April 2012 14:53 |
|
BlackSwan
Messages: 26766 Registered: January 2009 Location: SoCal
|
Senior Member |
|
|
>Thanks. May i ask you to post this solution.
I have no interest to implement any solution for you.
>Also there is a ftp command 'modtime' this is giving the file modification time in remote server.
>Could you please suggest me if this can be any useful for this requirement.
I have NO idea if it could be useful or not.
You would know for sure after doing some basic Proof of Concept testing.
|
|
|