source: trunk/src/series/usr_fct/clean_civ_cmx.m @ 1027

Last change on this file since 1027 was 1027, checked in by g7moreau, 6 years ago
  • Update Copyright 2017 -> 2018
File size: 4.4 KB
Line 
1%'clean_civ_cmx': suppress all ancillary files used for PIV: ;cmx,log,.bat...
2%------------------------------------------------------------------------
3% function GUI_input=clean_civ_cmx(num_i1,num_i2,num_j1,num_j2,Series)
4%
5%OUTPUT
6% GUI_input=list of options in the GUI series.fig needed for the function
7%
8%INPUT:
9%num_i1: (not used) series of first indices i (given from the series interface as first_i:incr_i:last_i, mode and list_pair_civ)
10%num_i2: (not used) series of second indices i (given from the series interface as first_i:incr_i:last_i, mode and list_pair_civ)
11%num_j1: (not used) series of first indices j (given from the series interface as first_j:incr_j:last_j, mode and list_pair_civ )
12%num_j2: (not used) series of second indices j (given from the series interface as first_j:incr_j:last_j, mode and list_pair_civ)
13%Series: Matlab structure containing information set by the series interface
14
15%=======================================================================
16% Copyright 2008-2018, LEGI UMR 5519 / CNRS UGA G-INP, Grenoble, France
17%   http://www.legi.grenoble-inp.fr
18%   Joel.Sommeria - Joel.Sommeria (A) legi.cnrs.fr
19%
20%     This file is part of the toolbox UVMAT.
21%
22%     UVMAT is free software; you can redistribute it and/or modify
23%     it under the terms of the GNU General Public License as published
24%     by the Free Software Foundation; either version 2 of the license,
25%     or (at your option) any later version.
26%
27%     UVMAT is distributed in the hope that it will be useful,
28%     but WITHOUT ANY WARRANTY; without even the implied warranty of
29%     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
30%     GNU General Public License (see LICENSE.txt) for more details.
31%=======================================================================
32
33function GUI_input=clean_civ_cmx(num_i1,num_i2,num_j1,num_j2,Series) %(filecell,filecell_1,num_i,num_j,vel_type,field,param);
34
35%requests for the visibility of input windows in the GUI series  (activated directly by the selection in the menu ACTION)
36if ~exist('num_i1','var')
37    GUI_input={'RootPath';'many';...%nbre of possible input series (options 'on'/'two'/'many', default:'one')
38        'SubDir';'on';... % subdirectory of derived files (PIV fields), ('on' by default)
39        %'RootFile';'on';... %root input file name ('on' by default)
40        %'FileExt';'on';... %input file extension ('on' by default)
41        %'NomType';'on';...%type of file indexing ('on' by default)
42        %'NbSlice';'on'; ...%nbre of slices ('off' by default)
43        %'VelTypeMenu';'one';...% menu for selecting the velocity type (civ1,..) options 'off'/'one'/'two', 'off' by default)
44        %'FieldMenu';'one';...% menu for selecting the field (s) in the input file(options 'off'/'one'/'two', 'off' by default)
45        %'CoordType';'on'...%can use a transform function 'off' by default
46        %'GetObject';'on'...%can use projection object ,'off' by default
47        %'GetMask';'on'...%can use mask option   ,'off' by default
48        %'PARAMETER'; options: name of the user defined parameter',repeat a line for each parameter
49               ''};
50    return %exit the function
51end
52%---------------------------------------------------------
53hseries=guidata(Series.hseries);%handles of the GUI series
54WaitbarPos=get(hseries.waitbar_frame,'Position');
55
56%%%%%%%%%%%%%%%%%%%%%%%%
57message='this function will delete all files with extensions .log, .bat, .cmx,.cmx2,.errors in the input directory(ies)';
58answer=msgbox_uvmat('INPUT_Y-N',message);
59if ~isequal(answer,'Yes')
60    return
61end
62nbdelete=0;
63testcell=iscell(Series.RootFile);
64if ~testcell
65    Series.RootPath={Series.RootPath};
66    Series.RootFile={Series.RootFile};
67    Series.SubDir={Series.SubDir};
68    Series.FileExt={Series.FileExt};
69    Series.NomType={Series.NomType};
70end
71for iview=1:length(Series.RootFile)
72    hdir=dir(fullfile(Series.RootPath{iview},Series.SubDir{iview}));%list files
73    for ilist=1:length(hdir)
74%         update_waitbar(hseries.waitbar,WaitbarPos,ilist/length(hdir))
75        FileName=hdir(ilist).name;
76        [dd,ff,Ext]=fileparts(FileName);
77        if isequal(Ext,'.log')||isequal(Ext,'.bat')||isequal(Ext,'.cmx')||isequal(Ext,'.cmx2')|| isequal(Ext,'.errors')
78            delete(fullfile(Series.RootPath{iview},Series.SubDir{iview},FileName))
79            nbdelete=nbdelete+1;
80        end
81    end
82end
83msgbox_uvmat('CONFIRMATION',['END: ' num2str(nbdelete) ' files deleted by clean_civ_cmx'])
84
85
86
Note: See TracBrowser for help on using the repository browser.