Statistics
| Revision:

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

History | View | Annotate | Download (1.4 kB)

1
/**
2
 * Main.
3
 *
4
 * @param args the args
5
 */
6
// Copyright © 2010-2013 ENS de Lyon.
7
// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
8
// Lyon 2, University of Franche-Comté, University of Nice
9
// Sophia Antipolis, University of Paris 3.
10
// 
11
// The TXM platform is free software: you can redistribute it
12
// and/or modify it under the terms of the GNU General Public
13
// License as published by the Free Software Foundation,
14
// either version 2 of the License, or (at your option) any
15
// later version.
16
// 
17
// The TXM platform is distributed in the hope that it will be
18
// useful, but WITHOUT ANY WARRANTY; without even the implied
19
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
20
// PURPOSE. See the GNU General Public License for more
21
// details.
22
// 
23
// You should have received a copy of the GNU General
24
// Public License along with the TXM platform. If not, see
25
// http://www.gnu.org/licenses.
26
// 
27
// 
28
// 
29
// $LastChangedDate: 2013-05-06 17:38:43 +0200 (lun. 06 mai 2013) $
30
// $LastChangedRevision: 2386 $
31
// $LastChangedBy: mdecorde $ 
32
//
33
package org.txm.test
34

    
35
// TODO: Auto-generated Javadoc
36
/* (non-Javadoc)
37
 * @see groovy.lang.Script#run()
38
 */
39
println "Hello World !"
40
for(File f : new File("/home/mdecorde/Bureau/bioling").listFiles())
41
{
42
        if(f.getName().endsWith(" corpus.txt"))
43
        {
44
                String name = f.getName();
45
                name = name.substring(0, name.length()- 11)+".txt"
46
                f.renameTo(new File(f.getParent(), name))
47
        }
48
}