function copydata(source,whattocopy,whichfiles) %example if nargin==0 source = 'devpc10'; whattocopy = 'image'; whichfiles = 'turtle2*.*'; end %check what to copy if isequal(whattocopy,'image') whatdir = '/home/robocup/svn/trunk/src/Turtle2/Vision/Tools/capture_photo/'; targetdir = whatdir; elseif isequal(whattocopy,'oldimage') whatdir = '/home/robocup/svn/trunk/src/Turtle2/Vision/Tools/capture_photo/old_photos/'; targetdir = '/home/robocup/svn/trunk/src/Turtle2/Vision/Tools/capture_photo/'; else disp('nothing copied') return end %copy data eval(['!scp robocup@' source ':' fullfile(whatdir,whichfiles) ' ' targetdir])