help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

find/match a file to a partial filename


From: Rose
Subject: find/match a file to a partial filename
Date: Tue, 7 May 2013 21:05:22 -0700 (PDT)

Hi,

I have been looking but can't seem to find exactly what I need. I have a
series of files which have a date and time stamp in the filename in the
format: dataYYMMDDHHMMSS.csv

I need to read in the files by hour, ignoring the minutes and seconds in the
filename. Currently I can do this for files with minutes and seconds equal
to zero e.g data130425050000.csv using:

    i = 0:24 
    filein = sprintf ("c:/Documents and Settings/My
Documents/data130425%02d0000.csv", i); 

But I'm not sure how to do it when the minutes and seconds are not zero, I
have just been typing in the numbers manually but this takes too long. I'm
sure there must be someway to automate it and ignore the last part of the
filename or tell it to accept the filename no matter what the minutes and
seconds are. No idea how to do it though, can you help?

Thanks,

Rose




--
View this message in context: 
http://octave.1599824.n4.nabble.com/find-match-a-file-to-a-partial-filename-tp4652719.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]