From: jacob lalaounis on 30 Apr 2010 08:17 Hello, i would like to create a folder with the input name that i give from the keyboard but the code creates myfilename folder. 'Give the name of the folder' myfilename=input('Input the filename:','s'); fprintf('You have requested file: %s\n', myfilename) mkdir('C:\myfilename'); thanks in advance jacob
From: dpb on 30 Apr 2010 09:11 jacob lalaounis wrote: > Hello, > i would like to create a folder with the input name that i give from the > keyboard > but the code creates myfilename folder. > 'Give the name of the folder' > myfilename=input('Input the filename:','s'); fprintf('You have requested > file: %s\n', myfilename) > mkdir('C:\myfilename'); Yes, it did exactly what you told it to... :) 'C:\myfilename' is a literal character string. You want something like mydirname = ['C:\' myfilename]; mkdir(mydirname); --
|
Pages: 1 Prev: help in Building s-Function code Next: Matlab GUI read in function from textbox |