Statistics
| Revision:

root / tmp / org.txm.groovy.core / src / groovy / org / txm / test / HelloWorld.groovy @ 966

History | View | Annotate | Download (1.4 kB)

1 321 mdecorde
/**
2 321 mdecorde
 * Main.
3 321 mdecorde
 *
4 321 mdecorde
 * @param args the args
5 321 mdecorde
 */
6 321 mdecorde
// Copyright © 2010-2013 ENS de Lyon.
7 321 mdecorde
// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
8 321 mdecorde
// Lyon 2, University of Franche-Comté, University of Nice
9 321 mdecorde
// Sophia Antipolis, University of Paris 3.
10 321 mdecorde
//
11 321 mdecorde
// The TXM platform is free software: you can redistribute it
12 321 mdecorde
// and/or modify it under the terms of the GNU General Public
13 321 mdecorde
// License as published by the Free Software Foundation,
14 321 mdecorde
// either version 2 of the License, or (at your option) any
15 321 mdecorde
// later version.
16 321 mdecorde
//
17 321 mdecorde
// The TXM platform is distributed in the hope that it will be
18 321 mdecorde
// useful, but WITHOUT ANY WARRANTY; without even the implied
19 321 mdecorde
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
20 321 mdecorde
// PURPOSE. See the GNU General Public License for more
21 321 mdecorde
// details.
22 321 mdecorde
//
23 321 mdecorde
// You should have received a copy of the GNU General
24 321 mdecorde
// Public License along with the TXM platform. If not, see
25 321 mdecorde
// http://www.gnu.org/licenses.
26 321 mdecorde
//
27 321 mdecorde
//
28 321 mdecorde
//
29 479 mdecorde
// $LastChangedDate: 2013-05-06 17:38:43 +0200 (lun. 06 mai 2013) $
30 321 mdecorde
// $LastChangedRevision: 2386 $
31 321 mdecorde
// $LastChangedBy: mdecorde $
32 321 mdecorde
//
33 321 mdecorde
package org.txm.test
34 321 mdecorde
35 321 mdecorde
// TODO: Auto-generated Javadoc
36 321 mdecorde
/* (non-Javadoc)
37 321 mdecorde
 * @see groovy.lang.Script#run()
38 321 mdecorde
 */
39 321 mdecorde
println "Hello World !"
40 321 mdecorde
for(File f : new File("/home/mdecorde/Bureau/bioling").listFiles())
41 321 mdecorde
{
42 321 mdecorde
        if(f.getName().endsWith(" corpus.txt"))
43 321 mdecorde
        {
44 321 mdecorde
                String name = f.getName();
45 321 mdecorde
                name = name.substring(0, name.length()- 11)+".txt"
46 321 mdecorde
                f.renameTo(new File(f.getParent(), name))
47 321 mdecorde
        }
48 321 mdecorde
}