Copia con Aplanamiento

casiano@exthost:~/src/groovy$ cat files/flatcopydir.groovy 
#!/usr/bin/env groovy                                      
def ant = new AntBuilder()                                 
ant.copy(todir: args[1], overwrite: true, flatten: true) { 
 fileset(dir: args[0])                                     
}

casiano@exthost:~/src/groovy$ ls -lR Pim\:Pam-Fuego/
Pim:Pam-Fuego/:                                     
total 16                                            
-rwxr--r-- 1 casiano Profesor  164 2010-04-21 16:18 Changes
drwxr-xr-x 3 casiano Profesor    0 2010-04-21 16:18 lib    
-rwxr--r-- 1 casiano Profesor  556 2010-04-21 16:18 Makefile.PL
-rwxr--r-- 1 casiano Profesor   75 2010-04-21 16:18 MANIFEST   
-rwxr--r-- 1 casiano Profesor 1191 2010-04-21 16:18 README
drwxr-xr-x 2 casiano Profesor    0 2010-04-21 16:18 t

Pim:Pam-Fuego/lib:
total 0
drwxr-xr-x 2 casiano Profesor 0 2010-04-21 16:18 Pim:Pam

Pim:Pam-Fuego/lib/Pim:Pam:
total 4
-rwxr--r-- 1 casiano Profesor 1780 2010-04-21 16:18 Fuego.pm

Pim:Pam-Fuego/t:
total 4
-rwxr--r-- 1 casiano Profesor 477 2010-04-21 16:18 Pim:Pam-Fuego.t
casiano@exthost:~/src/groovy$ files/flatcopydir.groovy Pim\:Pam-Fuego/ backup/
     [copy] Copying 6 files to /home/casiano/src/groovy/backup
     [copy] Copied 4 empty directories to 3 empty directories under /home/casiano/src/groovy/backup
casiano@exthost:~/src/groovy$ ls -lR backup/
backup/:
total 24
-rwxr--r-- 1 casiano Profesor  164 2010-04-21 16:23 Changes
-rwxr--r-- 1 casiano Profesor 1780 2010-04-21 16:23 Fuego.pm
drwxr-xr-x 2 casiano Profesor    0 2010-04-21 16:23 lib
-rwxr--r-- 1 casiano Profesor  556 2010-04-21 16:23 Makefile.PL
-rwxr--r-- 1 casiano Profesor   75 2010-04-21 16:23 MANIFEST
drwxr-xr-x 2 casiano Profesor    0 2010-04-21 16:23 Pim:Pam
-rwxr--r-- 1 casiano Profesor  477 2010-04-21 16:23 Pim:Pam-Fuego.t
-rwxr--r-- 1 casiano Profesor 1191 2010-04-21 16:23 README
drwxr-xr-x 2 casiano Profesor    0 2010-04-21 16:23 t

backup/lib:
total 0

backup/Pim:Pam:
total 0

backup/t:
total 0



Casiano Rodríguez León
2010-04-30