Movimientos y Supresiones usando Ant

casiano@exthost:~/src/groovy$ cat -n ./files/antmove.groovy
     1  #!/usr/bin/env groovy
     2  def ant = new AntBuilder()
     3  ant.move(file:'backup/Makefile.PL', tofile: 'backup/makefile.pl')
     4
     5  println(['ls', '-l',  'backup/makefile.pl'].execute().text)
     6
     7  ant.delete(file: 'Pim:Pam-Fuego/MANIFEST')
     8
     9  println(['ls', '-l',  'Pim:Pam-Fuego/'].execute().text)
    10
    11  ant.delete(dir: 'backup', includeemptydirs: "true")
    12
    13  println(['ls', '-l' ].execute().text)
    14
    15  ant.delete(dir: 'Pim:Pam-Fuego', includes: "**/*.pm")
    16
    17  println(['ls', '-lR', 'Pim:Pam-Fuego' ].execute().text)

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

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

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

Pim:Pam-Fuego/t:
total 4         
-rwxr--r-- 1 casiano Profesor 477 2010-04-21 16:49 Pim:Pam-Fuego.t
casiano@exthost:~/src/groovy$ ./files/antmove.groovy 
     [move] Moving 1 file to /home/casiano/src/groovy/backup
-rwxr--r-- 1 casiano Profesor 556 2010-04-21 16:49 backup/makefile.pl

   [delete] Deleting: /home/casiano/src/groovy/Pim:Pam-Fuego/MANIFEST
total 12                                                             
-rwxr--r-- 1 casiano Profesor  164 2010-04-21 16:49 Changes          
drwxr-xr-x 3 casiano Profesor    0 2010-04-21 16:49 lib              
-rwxr--r-- 1 casiano Profesor  556 2010-04-21 16:49 Makefile.PL      
-rwxr--r-- 1 casiano Profesor 1191 2010-04-21 16:49 README           
drwxr-xr-x 2 casiano Profesor    0 2010-04-21 16:49 t                

   [delete] Deleting directory /home/casiano/src/groovy/backup
total 24                                                      
-rwxr-xr-x 1 casiano Profesor  30 2010-02-04 23:24 area.groovy
-rwxr-xr-x 1 casiano Profesor 150 2010-04-21 15:44 build.xml  
drwxr-xr-x 3 casiano Profesor   0 2010-02-10 12:36 closures   
drwxr-xr-x 3 casiano Profesor   0 2010-02-10 12:36 control
drwxr-xr-x 3 casiano Profesor   0 2010-02-10 12:36 curry
drwxr-xr-x 3 casiano Profesor   0 2010-02-10 12:36 dates
drwxr-xr-x 4 casiano Profesor   0 2010-02-10 12:36 emilio
drwxr-xr-x 3 casiano Profesor   0 2010-04-21 16:46 files
-rwxr-xr-x 1 casiano Profesor 178 2010-02-05 00:20 Greetings.groovy
-rwxr--r-- 1 casiano Profesor 178 2010-02-05 00:20 Greetings.java
-rwxr-xr-x 1 casiano Profesor  24 2010-02-04 14:29 hello.groovy
-rwxr--r-- 1 casiano Profesor 199 2010-02-04 14:31 Makefile
drwxr-xr-x 3 casiano Profesor   0 2010-02-10 12:36 objects
drwxr-xr-x 3 casiano Profesor   0 2010-02-10 12:36 overloading
drwxr-xr-x 4 casiano Profesor   0 2010-04-21 16:50 Pim:Pam-Fuego
drwxr-xr-x 3 casiano Profesor   0 2010-04-21 15:03 processes
drwxr-xr-x 3 casiano Profesor   0 2010-02-10 12:36 script
drwxr-xr-x 6 casiano Profesor   0 2010-02-10 12:36 separatedcomp
drwxr-xr-x 3 casiano Profesor   0 2010-02-10 12:36 simpledatatypes
drwxr-xr-x 3 casiano Profesor   0 2010-02-10 12:36 strings
drwxr-xr-x 3 casiano Profesor   0 2010-02-10 12:36 yml

Pim:Pam-Fuego:
total 12
-rwxr--r-- 1 casiano Profesor  164 2010-04-21 16:49 Changes
drwxr-xr-x 3 casiano Profesor    0 2010-04-21 16:49 lib
-rwxr--r-- 1 casiano Profesor  556 2010-04-21 16:49 Makefile.PL
-rwxr--r-- 1 casiano Profesor 1191 2010-04-21 16:49 README
drwxr-xr-x 2 casiano Profesor    0 2010-04-21 16:49 t

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

Pim:Pam-Fuego/lib/Pim:Pam:
total 0

Pim:Pam-Fuego/t:
total 4
-rwxr--r-- 1 casiano Profesor 477 2010-04-21 16:49 Pim:Pam-Fuego.t

casiano@exthost:~/src/groovy$



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