Statistics
| Revision:

root / tmp / org.txm.core / src / groovy / org / txm / importer / doc / ODTMovePicturesFiles.groovy @ 187

History | View | Annotate | Download (453 Bytes)

1
package org.txm.importer.doc
2

    
3
File dir = new File("/home/mdecorde/TXM/corpora/temoignages/docfiles/")
4
File outdir = new File("/home/mdecorde/TXM/corpora/temoignages/HTML/TEMOIGNAGES/default/Pictures")
5
outdir.deleteDir()
6
outdir.mkdir()
7

    
8
for(def subdir : dir.listFiles()) {
9
        if (subdir.isDirectory()) {
10
                File picturesDir = new File(subdir, "Pictures")        
11
                for (def img : picturesDir.listFiles()) {
12
                        img.renameTo(new File(outdir, img.getName()))
13
                }
14
        }
15
}