Apachi ANT Beginner Programming - Copying an entire directory

I am using an ant script to copy a number of files to a server and would like to take the entire directory rather than each file seperately. I tried specifying * or *.* at the end of the path but I get this error:

java.io.FileNotFoundException: D:\PVCS\Workfiles\releases\applications\myTNT\Property_Files\*.* (The filename, directory name, or volume label syntax is incorrect)

My XML snipet is below, please help

<target name="copytoserver">
      <input message="username: " addproperty="user"/>
      <input message="password: " addproperty="password">
        <handler classname="org.apache.tools.ant.input.SecureInputHandler" />
  	  <scp trust="true" verbose="true" file="D:\PVCS\Workfiles\releases\applications\myTNT\war\myTNT-v5.11.1.3-20100929-1320.war" todir="${user}:${password}@gbaheweb0:/tmp"/>
  	  <scp trust="true" verbose="true" file="D:\PVCS\Workfiles\releases\applications\myTNT\Property_Files\*.*" todir="${user}:${password}@gbaheweb0:/tmp"/>
<!--  	  <scp trust="true" verbose="true" file="assima/${env.FOLDER}/${env.ZIPFILE}.zip" todir="${user}:${password}@gbahevpl17.ics.express.tnt:/communique/sunone/docs/expressnet/misc/assima"/>
--> 	</target>

Open in new window

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Try using a fileset
    <scp trust="true" verbose="true" todir="${user}:${password}@gbaheweb0:/tmp">
	<fileset dir="D:/PVCS/Workfiles/releases/applications/myTNT/Property_Files/">
	    <include name="**/*"/>

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Lico_wAuthor Commented:
Man, you two are smart! This has helped me soooo much, many thanks.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.