Dhan Priyan

Greenhorn
+ Follow
since May 10, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Dhan Priyan

Hai, I have some file xx.txt, it has the double values stored in it like below

1.2 1.4 23.44 12.78
23.4 12.45 23.0 10.4

i wanted to read this file and print to the Screen
I tried with my knowledge up to the following level. could any one help me to find the way.

thanks

15 years ago
Hai
I was trying couple of hours with searching a file in a dir.

could you please suggest/ give me some link/forum discussed to complete my work. i really messed up with this search:)
thanks
15 years ago
Thanks it was working fne:)
15 years ago
i get error when i search a directory / file



org.apache.commons.io.FileUtils;


not exists.
How to download and where to place
15 years ago
I need to write to the any file type ( .txt, .csv) the results obtained @ the marked place with UPPER CASE.
I am dealing with 2D array here.
could any one help me.



15 years ago
I understood it cannot be ;
but with poor knowledge i could not figure out how to solve it,
sorry for it

// The error in the other thread
i removed that already and i got some error with substring



run:
E:\java\check\100130.ixf
java.lang.StringIndexOutOfBoundsException: String index out of range: 2
at java.lang.String.substring(String.java:1935)
at CompareList.main(CompareList.java:84)
BUILD SUCCESSFUL (total time: 0 seconds)



do you have any suggestions
15 years ago
I understood it cannot be ;
but with poor knowledge i could not figure out how to solve it,
sorry for it

// The error in the other thread
i removed that already and i got some error with substring



run:
E:\java\check\100130.ixf
java.lang.StringIndexOutOfBoundsException: String index out of range: 2
at java.lang.String.substring(String.java:1935)
at CompareList.main(CompareList.java:84)
BUILD SUCCESSFUL (total time: 0 seconds)



do you have any suggestions
15 years ago
hai,
I could not understand how to debug the error i have now.
target
1- read the files from directory // i able ot do this part
2- for each file
for each file read the content & compare with the existing List & update the list // i able to do this part

when i try to combine both parts , i got some following error



run:
E:\java\check\100130.ixf
Error: children[i] (The system cannot find the file specified)
BUILD SUCCESSFUL (total time: 2 seconds)



i can see from the code that children[i] only gives the error when i use that in the second part of the code.

can any one help me on this??
Thanks
Priyan


the original code
15 years ago
thanks for the kind reply.
i was playing with this code, but i could not understand where to give the file names.
it might help me to link the directory part with this code later.



15 years ago
hai
any one tell me how can i append two files in java.

but these are the steps to be done:

note: directory1 & directory2 contains same files mostly

1- read the file1 from the directory1 // it is fine for me
2- read the file2 from the directory2 // it is fine for me

3- later i need to append file2 contents to the end of the file 1. // in this part i am lost with code.

thanks
Priyan
15 years ago
Thanks for the messages, sent to me,
i updated to my Original Name
Sorry for the trouble

as you mentioned l changed to Listfiles() instead of lst. but i get still error on the flowing part of the code

.


that is incompatible types
on

String filename = children[i];




can you please explain me little more.
i could not figure out it

also
Earlier the output was



run:
1., 3171.
Error: 3934.ixf (The system cannot find the file specified)
2., 3426.
3., 3780.
4., 4462.
5., 4899.
6., 4681.
7., 4761.
8., 3546.
9., 3525.
10., 3735.
11., 3658.
12., 5701.
13., 3198.
14., 3543.
15., 3751.
16., 5403.
17., 6186.
18., 5167.
19., 4894.
20., 3832.
21., 3829.
22., 4437.
23., 4126.
24., 3821.
25., 4070.
26., 4058.
27., 4126.
28., 3641.
29., 3387.
30., 3315.
31., 4018.
32., 5231.
33., 4919.
34., 3587.
35., 3859.
36., 4001.
37., 3811.
38., 4157.
39., 4191.
40., 4187.
41., 3142.
42., 195.
BUILD SUCCESSFUL (total time: 0 seconds)



thanks

15 years ago
Hai Implemented a code that will read the 100s of files from a directory.
Each time when i read a file , i will take that file and check the content of the file( i put them in to a List )and compare with the original List and if there is a different, then i update the array List with write function.
this is what i need
but i get error when i run the code, i coul dread only one file, later it stopped. it does not read the second file in the directory.
could any 1 help me o this

the code what i have is given below
15 years ago