Created
October 22, 2011 11:57
-
-
Save michalbcz/1305912 to your computer and use it in GitHub Desktop.
copy and flatten directories with pictures and zip it to single file as I am lame in Krusader file manager :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def ant = new AntBuilder() /* rules */ | |
/* copy my roadtrip pictures and videos from CD and flatten it */ | |
ant.copy(todir: "/home/michal/Pictures/Norsko2004", flatten: true /* if false (default) it copies directory structure too */) { | |
fileset(dir:"/media/Norsko 2004/Norsko 2004", casesensitive: false) { | |
include(name: "**/*.jpg") /* pictures... */ | |
include(name: "**/*.mov") /* ...and videos */ | |
} | |
} | |
/* then zip it all to single file */ | |
ant.zip(basedir:"/home/michal/Pictures/Norsko2004", destfile:"/home/michal/Pictures/Norsko2004/norsko2004.zip") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment