Manning's Countdown to 2014
. Use discount code crdotd14 all month for 50% off every deal.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Java in General
retrieve path name
Joined: Apr 02, 2012
Apr 25, 2012 11:24:01
So im working on a project where im supposed to dynamically load the contents of a .csv file into the database.I have been hard coding the path of the file till now like
inserted = insertFromFile("C:/Users/Student/Desktop/Book1.csv",connection, "customer");
however now i have to read multiple files from a folder and integrate the program with a GUI. I have 2 questions:
a)how do i read multiple files from a folder b)how do i retrieve the path of a file for the insert statement
any help is appreciated.
Joined: May 27, 2011
Apr 25, 2012 12:31:49
You should check the File class in java.io. It has methods to get all files from a folder and the pathname of a file (plus many more of course).
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
subject: retrieve path name
Problem in reading csv file
Web Application Configuration Question
Reading multiple CSV files
@MultipartConfig in Glassfish 3.1.1
using BufferedReader and looping
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013