Monday, May 21, 2012
Register





Pr-Select single value from multiple csv fils
Last Post 02 Feb 2012 11:17 AM by HorstR. 0 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Not Resolved
HorstR
New Member
New Member
Send Private Message
Posts:1
HorstR

--
02 Feb 2012 11:17 AM

    One of our monitoring tools creates hourly csv files in a folder.
    The structure of the file name is always the same "location" (e.g. Berlin, Munich) and "time" (hhmmss).
    The files itself contain a header and some rows with data.

    From all this files I need only the last from every location and from every hour. (below marked <==)
    Berlin_091013.csv         
    Berlin_091014.csv         
    Berlin_091017.csv         
    Berlin_091019.csv  <==        
    Munich_091005.csv         
    Munich_091006.csv         
    Munich_091007.csv         
    Munich_091008.csv  <==
    Munich_101005.csv         
    Munich_101006.csv         
    Munich_101007.csv         
    Munich_101008.csv  <==

    And from every of this files I need only the last record.

    To exclude all the other files/records would be very helpful because there are about 50000 files in the folder and I need only about 400 rows.

    But all my attempts failed.

    Thanks in advance.

    You are not authorized to post a reply.