File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
forum!
JavaRanch
»
Java Forums
»
Java
»
JSP
Author
File Name getting in jsp
ramesh poorella
Ranch Hand
Joined: Jul 19, 2011
Posts: 42
posted
Aug 02, 2011 02:43:43
0
How to get file Name here i am getting full path of the file... but i need only file name.. how it will be done?
File file = new File("D:\\Ramesh1\\Barcodegen\\WebRoot\\Images"); File[] files = file.listFiles(); for (int fileInList = 0; fileInList < files.length; fileInList++) { files[fileInList].toString()
N Sahni
Ranch Hand
Joined: Jul 07, 2011
Posts: 55
I like...
posted
Aug 02, 2011 03:06:06
0
Hi,
You can try:
files[fileInList].getName();
Thanks and Regards,
Nilesh Sahni |
nsahni@infocepts.com
| www.infocepts.com
ramesh poorella
Ranch Hand
Joined: Jul 19, 2011
Posts: 42
posted
Aug 02, 2011 03:13:06
0
N Sahni wrote:
Hi,
You can try:
files[fileInList].getName();
Thank you shani
I agree. Here's the link:
http://ej-technologies/jprofiler
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: File Name getting in jsp
Similar Threads
About deleting files using listFiles()
Path for Temporary Directory
how to configure weblogicserver 6.0
Why can't servlets access a file with a relative path
java code to connect Siebel webservice
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter