Quantcast
Channel: MATLAB Central Newsreader Recent Posts
Viewing all articles
Browse latest Browse all 19628

Help with selecting multiple files

$
0
0
So I have searched the message boards but haven't seen what I am looking for. Here is what I am trying to do.

1. Select multiple files from a directory. I currently can select a single file with the following. The number of files to open varies each time I will use this.

DefaultFile='';
[oldFileName,PathName] = uigetfile('*.dat','Select File to Modify',DefaultFile);
fid=fopen(fullfile(PathName,oldFileName));

2. Then I perform some stuff on one of the files.

3. Then I save the new file with a different extension using an fopen(), fprint(), and fclose().

4. Next I would like to perform steps 2 and 3 with each file selected in step 1 until all files have been modified and saved with the new extension.

Any tips?

Thanks.

Viewing all articles
Browse latest Browse all 19628

Trending Articles