Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
creating subfolder within folder

Subject: creating subfolder within folder

From: Poulomi

Date: 13 Aug, 2013 19:08:08

Message: 1 of 5

Hi,

I have list of models stored in a text file. I need to read the text file and create sub-folders, given as the model names stored in the text file. For example, say in my text file contains foll. info:

{A1
A2
...
...
...
A100}

I need to crate sub-folders as the name A1, A2, ...., A100. After creating these sub-folders I need to process my data and save the text output within the corresponding sub-folders (i.e., each time the program will run for say A1, store it in A1 sub-folder, then next for A2 and store it in A2 & so on...). How I can do so. Pls. let me know. Thanks,

Subject: creating subfolder within folder

From: TideMan

Date: 13 Aug, 2013 20:12:29

Message: 2 of 5

On Wednesday, August 14, 2013 7:08:08 AM UTC+12, Poulomi wrote:
> Hi,
>
>
>
> I have list of models stored in a text file. I need to read the text file and create sub-folders, given as the model names stored in the text file. For example, say in my text file contains foll. info:
>
>
>
> {A1
>
> A2
>
> ...
>
> ...
>
> ...
>
> A100}
>
>
>
> I need to crate sub-folders as the name A1, A2, ...., A100. After creating these sub-folders I need to process my data and save the text output within the corresponding sub-folders (i.e., each time the program will run for say A1, store it in A1 sub-folder, then next for A2 and store it in A2 & so on...). How I can do so. Pls. let me know. Thanks,

help mkdir

Subject: creating subfolder within folder

From: Poulomi

Date: 14 Aug, 2013 13:38:08

Message: 3 of 5


mkdir just creates folder of specified name but I need to read the model name given in the text file one by one and creates folder as is the model name. Then after running operations I need to save the text files in corresponding model name folder. Thanks,

TideMan <mulgor@gmail.com> wrote in message <c805f769-2add-429f-b7d3-ddd74d20c37d@googlegroups.com>...
> On Wednesday, August 14, 2013 7:08:08 AM UTC+12, Poulomi wrote:
> > Hi,
> >
> >
> >
> > I have list of models stored in a text file. I need to read the text file and create sub-folders, given as the model names stored in the text file. For example, say in my text file contains foll. info:
> >
> >
> >
> > {A1
> >
> > A2
> >
> > ...
> >
> > ...
> >
> > ...
> >
> > A100}
> >
> >
> >
> > I need to crate sub-folders as the name A1, A2, ...., A100. After creating these sub-folders I need to process my data and save the text output within the corresponding sub-folders (i.e., each time the program will run for say A1, store it in A1 sub-folder, then next for A2 and store it in A2 & so on...). How I can do so. Pls. let me know. Thanks,
>
> help mkdir

Subject: creating subfolder within folder

From: Godzilla

Date: 14 Aug, 2013 19:10:14

Message: 4 of 5

"Poulomi" wrote in message <kug180$qmu$1@newscl01ah.mathworks.com>...
>
> mkdir just creates folder of specified name but I need to read the model name given in the text file one by one and creates folder as is the model name. Then after running operations I need to save the text files in corresponding model name folder. Thanks,
>
> TideMan <mulgor@gmail.com> wrote in message <c805f769-2add-429f-b7d3-ddd74d20c37d@googlegroups.com>...
> > On Wednesday, August 14, 2013 7:08:08 AM UTC+12, Poulomi wrote:
> > > Hi,
> > >
> > >
> > >
> > > I have list of models stored in a text file. I need to read the text file and create sub-folders, given as the model names stored in the text file. For example, say in my text file contains foll. info:
> > >

help mkdir
help cd
> > >
> > >
> > > {A1
> > >
> > > A2
> > >
> > > ...
> > >
> > > ...
> > >
> > > ...
> > >
> > > A100}
> > >
> > >
> > >
> > > I need to crate sub-folders as the name A1, A2, ...., A100. After creating these sub-folders I need to process my data and save the text output within the corresponding sub-folders (i.e., each time the program will run for say A1, store it in A1 sub-folder, then next for A2 and store it in A2 & so on...). How I can do so. Pls. let me know. Thanks,
> >
> > help mkdir

Subject: creating subfolder within folder

From: TideMan

Date: 14 Aug, 2013 20:00:03

Message: 5 of 5

On Thursday, August 15, 2013 1:38:08 AM UTC+12, Poulomi wrote:
> mkdir just creates folder of specified name but I need to read the model name given in the text file one by one and creates folder as is the model name. Then after running operations I need to save the text files in corresponding model name folder. Thanks,
>
>
>
> TideMan <mulgor@gmail.com> wrote in message <c805f769-2add-429f-b7d3-ddd74d20c37d@googlegroups.com>...
>
> > On Wednesday, August 14, 2013 7:08:08 AM UTC+12, Poulomi wrote:
>
> > > Hi,
>
> > >
>
> > >
>
> > >
>
> > > I have list of models stored in a text file. I need to read the text file and create sub-folders, given as the model names stored in the text file. For example, say in my text file contains foll. info:
>
> > >
>
> > >
>
> > >
>
> > > {A1
>
> > >
>
> > > A2
>
> > >
>
> > > ...
>
> > >
>
> > > ...
>
> > >
>
> > > ...
>
> > >
>
> > > A100}
>
> > >
>
> > >
>
> > >
>
> > > I need to crate sub-folders as the name A1, A2, ...., A100. After creating these sub-folders I need to process my data and save the text output within the corresponding sub-folders (i.e., each time the program will run for say A1, store it in A1 sub-folder, then next for A2 and store it in A2 & so on...). How I can do so. Pls. let me know. Thanks,
>
> >
>
> > help mkdir

Don't top post. It makes the thread hard to follow.
Put your reply UNDERNEATH.

What do you mean "mkdir just creates folder of specified name"?
Isn't that what you want to do?
pth='c:\MyModels\';
mkdir(pth,'MyModelNameNo1')
mkdir(pth,'MyModelNameNo2')
etc

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us