You Are Here:

Community: Developer Discussion Boards

#1 Old Data read & write in a file - 2008-04-01, 14:46

Join Date: Mar 2008
Posts: 76
Send a message via MSN to Aliencse
Aliencse's Avatar
Aliencse
Offline
Regular Contributor
Hi All
I'm trying to read a text file and write the content of that text file into another text file.

Code is as below

String oldName= "file:///C:/data/text1.txt";
String newName= "file:///C:/data/text2.txt";

FileConnection fci = (FileConnection)Connector.open(oldName);
FileConnection fco = (FileConnection)Connector.open(newName);

Whenever i want to run it through neatbeans6.0 it shows that root isn't accessible.

BR
Javed
Last edited by Aliencse : 2008-04-02 at 14:17.
Reply With Quote

#2 Old Re: Data read & write in a file - 2008-04-01, 22:00

Join Date: Sep 2007
Posts: 874
honest_success's Avatar
honest_success
Offline
Forum Nokia Champion
There will be folder named named root1 in the follwing path.

C:\WTK22\appdb\DefaultColorPhone\filesystem\

put your file and directory in it.

And crate string as followign.

"file///root1/dir1/dir2/file1.txt"
Last edited by honest_success : 2008-04-01 at 22:15. Reason: spelling mistake
Reply With Quote

#3 Old Re: Data read & write in a file - 2008-04-02, 04:19

Join Date: Mar 2008
Posts: 76
Send a message via MSN to Aliencse
Aliencse's Avatar
Aliencse
Offline
Regular Contributor
Thanks for your reply. No i dont it for wtk only. I did it before through wtk2.5.

But I want to read and write file through neatbean 6.0 editor which includes wtk 2.5.2. Now tell me through neatbean how i can read and write file? what will be exact path?

Thanks in advance
Javed
Reply With Quote

#4 Old Re: Data read & write in a file - 2008-04-03, 08:15

Join Date: Mar 2008
Posts: 76
Send a message via MSN to Aliencse
Aliencse's Avatar
Aliencse
Offline
Regular Contributor
Hi Honest_Success

If i want to read a file from a path , the path isn't like as C:\WTK\appdb\DefaultColorPhone\filesystem\root1 and then want to write the content of that file to a file as my expected path, is it possible?

BR
Javed
Reply With Quote

#5 Old Re: Data read & write in a file - 2008-04-03, 09:43

Join Date: Dec 2007
Posts: 62
susrap's Avatar
susrap
Offline
Regular Contributor
Hi ,
I dont understand what you are telling but see if you are using WTK2.5 means you are developing application which runs in a mobile and in mobiles you dont find a path like C:\.... . If you want to read from simple system or server use http or stream connection and connect to the system to read or write . But make sure that the system must have IP address with which you can connect.
BR
Reply With Quote

#6 Old Re: Data read & write in a file - 2008-04-03, 10:59

Join Date: Mar 2008
Posts: 76
Send a message via MSN to Aliencse
Aliencse's Avatar
Aliencse
Offline
Regular Contributor
Hi Susrap
Yap I'm using wtk2.5, no right now I'm not testing it on mobile, now I'm testing read & write in pc's.

Read & write file can be done in pc's root1 folder where wtk is installed like C:\WTK\appdb\DefaultColorPhone\filesystem\root1.

But I'm trying to read & write a file as my expected folder or path not from root1 folder.

Is it possible???

BR
Javed
Reply With Quote

#7 Old Smile Re: Data read & write in a file - 2008-04-05, 07:56

Join Date: Dec 2007
Posts: 62
susrap's Avatar
susrap
Offline
Regular Contributor
Quote:
Originally Posted by Aliencse View Post
Hi Susrap
Yap I'm using wtk2.5, no right now I'm not testing it on mobile, now I'm testing read & write in pc's.

Read & write file can be done in pc's root1 folder where wtk is installed like C:\WTK\appdb\DefaultColorPhone\filesystem\root1.

But I'm trying to read & write a file as my expected folder or path not from root1 folder.

Is it possible???

BR
Javed
Sorry for delay.Try using socket connection by connecting to the system using IP.But i dont think it will work . If you want to access from server you can do it very easily using Http or Stream Connection Api's
BR.
Reply With Quote

#8 Old Re: Data read & write in a file - 2008-04-08, 06:02

Join Date: Mar 2008
Posts: 76
Send a message via MSN to Aliencse
Aliencse's Avatar
Aliencse
Offline
Regular Contributor
Hi Susrap
I think you couldn't identify mine problem. No i don't wanna acces any remote devices so server or other remote devices...........needn't to mention here.

I told you that file read and write work fine in the following directory

C:\WTK\appdb\DefaultColorPhone\filesystem\root1.

But I'm trying to read & write file as my expected directory or path not from C:\WTK\appdb\DefaultColorPhone\filesystem\root1.
Is it possible???

Regards
Javed
Reply With Quote

#9 Old Re: Data read & write in a file - 2008-04-08, 08:18

Join Date: Dec 2007
Posts: 62
susrap's Avatar
susrap
Offline
Regular Contributor
Quote:
Originally Posted by Aliencse View Post
Hi Susrap
I think you couldn't identify mine problem. No i don't wanna acces any remote devices so server or other remote devices...........needn't to mention here.

I told you that file read and write work fine in the following directory

C:\WTK\appdb\DefaultColorPhone\filesystem\root1.

But I'm trying to read & write file as my expected directory or path not from C:\WTK\appdb\DefaultColorPhone\filesystem\root1.
Is it possible???

Regards
Javed
Try to understand the logic i am not talking about any remote system . I was explaining about methods to connect to system.If you can use blue tooth you can also use that . Without connecting how can you access the files in system ?? . If you have already tried the ways which i have told you then i think its not possible if u haven't tried just try it . OK.
BR.
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
data file read and write toinks General Symbian C++ 28 2006-11-07 09:27
Read and Write a custom settings file.... skhimsara General Symbian C++ 2 2006-04-25 07:01
What is the error in my code here? Unable to Save document to file yuva69 General Symbian C++ 1 2005-05-26 15:22
nokia 7210 modem via IR doesn't work ! oussamaaiadi PC Suite API and PC Connectivity SDK 1 2003-03-06 11:46
Looking for help from member......pl...help me in my source code. yuva69 General Symbian C++ 0 2002-06-10 13:24

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d18645X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZentertainmentQ qfnZtopicQUqfnTopicZj2meQ qfnZtopicQUqfnTopicZjavaQ qfnZtopicQUqfnTopicZmediaQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ