ParentDir='F:\ValAro\00Stats\RandStatsSmooth'
F = struct( 
    'names',  {{
            'CPosHiGTNeutAll','CPosHiLTNeutAll','CNegHiGTNeutAll','CNegHiLTNeutAll','CPosLoGTNeutAll',
            'CPosLoLTNeutAll','CNegLoGTNeutAll','CNegLoLTNeutAll','CPosHiGTNegHiAll','CPosHiLTNegHiAll',                 %10
            'CPosLoGTNegLoAll','CPosLoLTNegLoAll','CAroHiGTLoAll','CAroHiLTLoAll','CAroLinHiGTLoAll',
            'CAroLinHiLTLoAll','CAroExp1HiGTLoAll','CAroExp1HiLTLoAll','CAroExp2HiGTLoAll','CAroExp2HiLTLoAll',           %20
            'CValPosGTNegAll','CValPosLTNegAll','CPosHiGTNeutSlow','CPosHiLTNeutSlow','CNegHiGTNeutSlow',
            'CNegHiLTNeutSlow','CPosLoGTNeutSlow','CPosLoLTNeutSlow','CNegLoGTNeutSlow','CNegLoLTNeutSlow',               %30
            'CPosHiGTNegHiSlow','CPosHiLTNegHiSlow','CPosLoGTNegLoSlow','CPosLoLTNegLoSlow','CAroHiGTLoSlow',
            'CAroHiLTLoSlow','CAroLinHiGTLoSlow','CAroLinHiLTLoSlow','CAroExp1HiGTLoSlow','CAroExp1HiLTLoSlow',           %40
            'CAroExp2HiGTLoSlow','CAroExp2HiLTLoSlow','CValPosGTNegSlow','CValPosLTNegSlow','CPosHiGTNeutFast',
            'CPosHiLTNeutFast','CNegHiGTNeutFast','CNegHiLTNeutFast','CPosLoGTNeutFast','CPosLoLTNeutFast',               %50
            'CNegLoGTNeutFast','CNegLoLTNeutFast','CPosHiGTNegHiFast','CPosHiLTNegHiFast','CPosLoGTNegLoFast',             
            'CPosLoLTNegLoFast','CAroHiGTLoFast','CAroHiLTLoFast','CAroLinHiGTLoFast','CAroLinHiLTLoFast',                 %60
            'CAroExp1HiGTLoFast','CAroExp1HiLTLoFast','CAroExp2HiGTLoFast','CAroExp2HiLTLoFast','CValPosGTNegFast',
            'CValPosLTNegFast','CFastGTSlow','CFastLTSlow','CFastGTSlowNegHi','CFastLTSlowNegHi',                            %70
            'CFastGTSlowNegLo','CFastLTSlowNegLo','CFastGTSlowNeut','CFastLTSlowNeut','CFastGTSlowPosLo',
            'CFastLTSlowPosLo','CFastGTSlowPosHi','CFastLTSlowPosHi','CFastGTSlowHiAro','CFastLTSlowHiAro',                  %80
            'CFastGTSlowLoAro','CFastLTSlowLoAro','CFastGTSlowNegVal','CFastLTSlowNegVal','CFastGTSlowPosVal', 
            'CFastLTSlowPosVal','CPosHiLTPosLoAll','CPosHiGTPosLoAll','CPosHiLTPosLoSlow','CPosHiGTPosLoSlow',               %90
            'CPosHiLTPosLoFast','CPosHiGTPosLoFast','CNegHiLTNegLoAll','CNegHiGTNegLoAll','CNegHiLTNegLoSlow', 
            'CNegHiGTNegLoSlow','CNegHiLTNegLoFast','CNegHiGTNegLoFast','CPosHiLTNegLoAll','CPosHiGTNegLoAll',              %100
            'CPosHiLTNegLoSlow','CPosHiGTNegLoSlow','CPosHiLTNegLoFast','CPosHiGTNegLoFast','CNegHiLTPosLoAll', 
            'CNegHiGTPosLoAll', 'CNegHiLTPosLoSlow','CNegHiGTPosLoSlow','CNegHiLTPosLoFast','CNegHiGTPosLoFast',             %110
        }})
%   This software is protected by german copyright and international treaties.             
%   Copyright 2004 Markus Junghöfer & Peter Peyk. All Rights Reserved.                     
%                                                                                          
%   THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE        
%   NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO,    
%   WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE    
%   OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS,
%   TRADEMARKS OR OTHER RIGHTS. COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT,       
%   INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE      
%   OR DOCUMENTATION.                                                                      
[MkDirStatus,MkDirMsg]=mkdir(ParentDir,'001_EffectsOfInterest');
if MkDirStatus==0
    fprintf(1,'Directory\n')
    fprintf(1,'001_EffectsOfInterest')
    fprintf(1,'already exists in\n')
    fprintf(1,ParentDir)
elseif MkDirStatus==1
    fprintf(1,'Create directory\n')
    fprintf(1,'001_EffectsOfInterest')
    fprintf(1,'\n')
    fprintf(1,'in\n')
    fprintf(1,ParentDir)
elseif MkDirStatus==2
    fprintf(1,'Can not create directory:\n')
    fprintf(1,'001_EffectsOfInterest')
    fprintf(1,'in\n')
    fprintf(1,ParentDir)
    fprintf(1,'\n\n')
    fprintf(1,'Error message:\n')
    fprintf(1,MkDirMsg)
end
for i=1:size(F.names,2)
    j=i+1;
    if j<10
        jStr=['00',int2str(j)];
    elseif j>9 & j<100
        jStr=['0',int2str(j)];
    else
        jStr=[int2str(j)];
    end
    NewDir=char(F.names(i));
    NewDir=[jStr,'_',NewDir(2:length(NewDir))]
    ParentDir
    [MkDirStatus,MkDirMsg]=mkdir(ParentDir,NewDir);
    if MkDirStatus==0
        fprintf(1,'Directory\n')
        fprintf(1,NewDir)
        fprintf(1,'already exists in\n')
        fprintf(1,ParentDir)
    elseif MkDirStatus==1
        fprintf(1,'Create directory\n')
        fprintf(1,NewDir)
        fprintf(1,'\n')
        fprintf(1,'in\n')
        fprintf(1,ParentDir)
    elseif MkDirStatus==2
        fprintf(1,'Can not create directory:\n')
        fprintf(1,NewDir)
        fprintf(1,'in\n')
        fprintf(1,ParentDir)
        fprintf(1,'\n\n')
        fprintf(1,'Error message:\n')
        fprintf(1,MkDirMsg)
    end
end


