• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to get File by passing fileName in java.

 
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I've lots of file in folder. I want some particular file from that folder, I've the file name. Currently I'm taking all those files in array and looping over that array. But, It is bad idea. I want to pass that file name, and it should get me that particular file out of that 100k file. So, I want snippet with explanation.

Thanks All,
Ramakrishna K.C
 
Rancher
Posts: 989
9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ramakrishna Udupa wrote: Currently I'm taking all those files in array and looping over that array. But, It is bad idea.


Why do you think it's a bad idea?

Ramakrishna Udupa wrote:I want to pass that file name, and it should get me that particular file out of that 100k file. So, I want snippet with explanation.


What 100k file? I thought you said the files are in a folder? Where does the 100k file come into this?

Ramakrishna Udupa wrote:So, I want snippet with explanation.


You are unlikely to get that. What you will get is help with your code.
 
Ramakrishna Udupa
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the reply E Armitage

Thanks guys, I got the solution.

Thanks All
Ramakrishna K.C
reply
    Bookmark Topic Watch Topic
  • New Topic