aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes moving files via ant Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "moving files via ant" Watch "moving files via ant" New topic
Author

moving files via ant

Ranadhir Nag
Ranch Hand

Joined: Mar 09, 2006
Posts: 138
i have a war hidden at a sublevel with a directory 'Axx'(C:\Axx\output\classes\lib\*.war).
This needs to need to be copied over to the root loaction of dir 'Bxx'.

If I write a ant move task as:
<move todir="${deploy_dir}">
<fileset dir="${output_dir}">
<include name="**/*.war"/>
</fileset>
</move>
This would copy over but maintain the directory structure rather than put in under C:\Bxx.
I can do a hard-coding of the full path;but i would rather avoid that.

Is there some way possible to achive this 'move' without resorting to hard-coding of the entire path to the file?

Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5842
    
    7

Try adding the "flatten" attribute to the copy task.


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: moving files via ant