Saturday, April 10, 2010

Unix commands inside matlab: cp, mkdir, rm etc

Implementing the unix commands in the matlab is so easy.
I wanted to automate the file organizing process.
A very simple code combined with http://usefulcodes.blogspot.com/2010/03/recursive-action-into-folders.html is going to work great!
unix('mkdir back') % make directory for backup

unix('cp *.m back') % copy to it or may be more would be better
unix('cp  114.mat back') % copy the file to be saved
unix('cp *.jpg back') % copy the figure to be saved
unix('rm *.*') % delete all files :) not directory

No comments: