Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Apachi ANT Beginner Programming - Copying an entire directory

Avatar of Lico_w
Lico_w asked on
5 Comments1 Solution354 ViewsLast Modified:
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>
Avatar of CEHJ
This problem has been solved!
Unlock 1 Answer and 5 Comments.
See Answers