I know that I've done a post on copying files with Ant, but I really want to take this further and into more detail. To save my fingers a lot of the text below is taken from my first post as moving and copying directories/files is a similar command in principle.
I also want to mention that I am running all my Ant tasks via Eclipse and not the command line. If there is a demand to know how to install Ant and run it from the command line I'll do that post separately. At this point I'm assuming you've got Eclipse and you know you way around it enough? Before we do begin you will need to ensure that you can see the Console 'View', you can get to this by going to:
I'm trying sort my input to the concat task alphabeticly with this:
<concat destfile="${temp}/s3/management.css"> <sort> <!--this sort does not work if there are over 9 files --> <name xmlns="antlib:org.apache.tools.ant.types.resources.comparators"/> <fileset dir="${temp}/assets/min/css/" includes="*.css"/> </sort> </concat>
My files are named 1styles.css, 2styles.css, 3styles.css, etc. However, once the count reaches 10 the order gets messed up and 10styles.css is loaded first.
I would like to copy my project files from their location to another location outside of my project?
More detail, I'm writing php and I am looking for a way to just be able to run my ant file and have it copy the files to my iis directory which is somewhere else on my computer. If it could do a file compare and only transfer the files recently modified would be awesome. Then also I would like to learn how to also do this over SSH where it will open up a connection and transfer files over ssh. Currently I use WinSCP and it's compare functionality to make a SSH connection, compare files I've changed, then upload only my changes.