Results 1 to 1 of 1
- 08-15-2011, 09:23 PM #1
Member
- Join Date
- Aug 2011
- Posts
- 1
- Rep Power
- 0
Creating a Single CSV from Multiple CSV's with some adjustments
I am writing an application to check the last modified date on two files for a large number of remote locations. I have a batch file at each location that creates a csv with the following information:
Just as a note, this is an example, I'm not actually checking those two file names. The location ID is based on a variable and will be different for each location.Java Code:1111 //location ID// 08/03/2011 01:37 PM <DIR> Python27 //first file checked// 06/01/2011 12:18 PM 44 ip.txt //second file checked//
THE PART I NEED TO DO IN JAVA:
I am writing an interface where you select a folder containing lets say 100 of these text files and I first want to make a single CSV out of all of them with the following format:
I have found several threads on how to combine CSV files, but it just merges them. I need to read each CSV and take only a piece of the data from the lines and create a new CSV based on the data in them. I think I could potentially use a String Tokenizer to do this but I am not sure. Also as a note I am creating a swing interface for this program so the directory would be selected with a dialogue box and then once selected it would read the directory and create the new CSV. The part of the code where I select the dialogue is below. If this doesn't make sense or more details are needed please let me know and I will respond. I am new to Java and so I may be totally missing something.Java Code:1111,08/03/2011,06/01/2011
Java Code:public void actionPerformed(ActionEvent evt) { Object source = evt.getSource(); if (source == load) { int returnVal = comb.showDialog(BackupCheck.this, "Make CSV"); comb.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
Similar Threads
-
Can Single EJB Subscribe to Multiple Topics?
By shptlucky in forum Enterprise JavaBeans (EJB)Replies: 1Last Post: 04-22-2011, 11:30 AM -
Multiple Sockets on a single Port
By Sajith in forum NetworkingReplies: 2Last Post: 08-16-2010, 06:31 PM -
Multiple Java in a single BOX
By luke_devon in forum New To JavaReplies: 2Last Post: 07-05-2010, 01:59 PM -
Single Tomcat Multiple Developers
By Quentinb in forum EclipseReplies: 3Last Post: 06-14-2010, 01:40 PM -
multiple users with single connection
By nishi.kishore in forum Java ServletReplies: 3Last Post: 09-06-2009, 03:15 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks