Sailing

Greenhorn
+ Follow
since Jun 26, 1999
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sailing

Originally posted by Mikael Jonasson:
Have you tried including the original directory in the the files created in the loop?
File f = new File(args[0],files[i]);
Not sure it will help, but it's a suggestion.
/Mike


Thanks Mike, I try to change that to File f = new File(args[0]+ files[i]); but still not work. Your suggestion is correct. It's really appreciated for your help
22 years ago

Originally posted by Mikael Jonasson:
Is the code a cut from your program, or did you type it? The reason I ask is that the for-loop looks kind of strange. It's missing the end perantesis for one thing.
/Mike


I changed that. please check it again
22 years ago
I am a beginner of java. I have written a code for list all the file in the direction.

But I found some problem on running this class.
If the class is at the same dir as the path parameter I call this class. The result will be fine. But if I the path parameter is a different path with which the class located. Only the .class, .java will be return as isFile = true. The other file will displayed as directory. Do I made any mistake in the code above.
Thanks

[This message has been edited by Sailing (edited June 27, 2001).]
(edited by Cindy to format code)
[This message has been edited by Cindy Glass (edited June 27, 2001).]
22 years ago