[Logo]
Forums Register Login
Copy from one file to another
I have written some code to copy contents from one file to another but it doesn't work.
Please tell me what's wrong with this code.

Add these two line as shown in the code :--


See , if you are getting the result.
I have checked it , as it worked.
Here we are just closing the two streams.
 

Originally posted by Mishra Anshu:
Add these two line as shown in the code :--


See , if you are getting the result.
I have checked it , as it worked.
Here we are just closing the two streams.



Thanks for replying. It's working now. i guess there was some problem in opening the file in the root. I changed the path to /usr/local and now its working
Gr8

did it work without closing the stream ?
I mean you added this line or not ?

 

Originally posted by Mishra Anshu:
Gr8

did it work without closing the stream ?
I mean you added this line or not ?



Yes it even workd without closing the stream.
permaculture is a more symbiotic relationship with nature so I can be even lazier. Read tiny ad:
ScroogeXHTML 7.1 - RTF to HTML5 / XHTML converter
https://coderanch.com/t/690611/ScroogeXHTML-RTF-HTML-XHTML-converter


This thread has been viewed 743 times.

All times above are in ranch (not your local) time.
The current ranch time is
Feb 22, 2018 05:38:06.