help-octave
[Top][All Lists]
Advanced

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

Re: find/match a file to a partial filename


From: Rose
Subject: Re: find/match a file to a partial filename
Date: Sun, 12 May 2013 21:47:05 -0700 (PDT)

Hi,

Thanks for your help. I found that this works:

i = 3
filedir = ["C:" filesep() "Octave" filesep() "data 110223%02d????.csv"];
globpat = sprintf(filedir, i);
filename = sprintf(" %s", glob(globpat){:});

this code finds the file I am looking for. Except that Octave prints
filename like this:

filename = C:\Octave\data 110223033325.csv

but I need it in this format:

filename = C:/Octave/data 110223033325.csv

so that I can extract the data in the file like this:

data = dlmread(filename,",:",6,0)

I'm not sure how to change the backslashes into forward slashes. Sorry if
this is a simple question, any help would be appreciated?

Thanks,

Rose



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


reply via email to

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