adding to a Directory

2 views (last 30 days)
Bullet200m
Bullet200m on 5 Mar 2013
Hi. I'm trying to add a few pgm images to a matlab directory called posData. How is this done?

Answers (2)

Azzi Abdelmalek
Azzi Abdelmalek on 5 Mar 2013
imwrite(im,'yourfolder/image.pgm')
  1 Comment
Bullet200m
Bullet200m on 5 Mar 2013
Im using a couple of thousand images saved on my labtop and im trying to add them to the posData directory which is incorporated in my toolbox

Sign in to comment.


Azzi Abdelmalek
Azzi Abdelmalek on 5 Mar 2013
Edited: Azzi Abdelmalek on 5 Mar 2013
f=dir('yourfolder/*.pgm')
files={f.name'}
for k=1:numel(files)
copyfile(['yourfolder/' files{k}],['NewFolder/' files{k}])
end
You can also use movefile

Categories

Find more on File Operations in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!