Cody

Problem 1866. Usage of mkdir and copyfile

Solution 668002

Submitted on 8 May 2015 by Gergely Patay
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
%% pwd dir newpath='/level/files/'; file2copy='create_dir_copyfile.m'; create_dir_copyfile(newpath,file2copy); cd(newpath(2:end)) % 'level/files' pwd z=dir; assert(strcmp(z(3).name,file2copy)) % only 1 file to be copied

ans = /users/mss.system.2HLCTW +cody .. create_dir_copyfile_testsuite.m . create_dir_copyfile.m ans = /users/mss.system.2HLCTW/level/files

Suggested Problems

More from this Author246

Community Treasure Hunt

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

Start Hunting!