Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 52563 invoked from network); 15 Apr 2007 22:33:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Apr 2007 22:33:58 -0000 Received: (qmail 46636 invoked by uid 500); 15 Apr 2007 22:34:01 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 46603 invoked by uid 500); 15 Apr 2007 22:34:00 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 46592 invoked by uid 99); 15 Apr 2007 22:34:00 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 15 Apr 2007 15:34:00 -0700 X-ASF-Spam-Status: No, hits=0.3 required=10.0 tests=PLING_QUERY X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [206.190.48.228] (HELO web52705.mail.re2.yahoo.com) (206.190.48.228) by apache.org (qpsmtpd/0.29) with SMTP; Sun, 15 Apr 2007 15:33:53 -0700 Received: (qmail 25563 invoked by uid 60001); 15 Apr 2007 22:33:32 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=UHpoICN0Y4kowauNrex0Va3YEqhpRywionknWma8+OUMMbaEK49jr8TWKMmkuRFJrc892N2j7W35tCrijMUnT0ynm5LZhhjTB+HFkDKwcpRGFNgGMZPMQBLNmNuyhzT5a+H6qipikKcqP/Q/ccuWYKF8wX5fNinG8KVRDdjbAK8=; X-YMail-OSG: oa.r.uIVM1nRG6IGNGnXJ.eE8kq8CZLePH4dQsrDpiQWXC64KOhhDG_FB76gHM_O60Ih51WEe2eU0SXVKlv_0NhtrZ0LSndAaGxf_AGx3ej.AyXYRYn_fyCiM7iL Received: from [75.21.50.207] by web52705.mail.re2.yahoo.com via HTTP; Sun, 15 Apr 2007 15:33:32 PDT Date: Sun, 15 Apr 2007 15:33:32 -0700 (PDT) From: Anil Philip Subject: RE: help! how to send multiple files to remote machine? ant-jsch To: user@ant.apache.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <748427.23420.qm@web52705.mail.re2.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org No replies? --- Anil Philip wrote: > I am using scp programmatically, but I found this > task > here with wildcards, in the examples documentation > - > Anil > . > > Copy a set of files to a directory > > > > > > > > > > > > > --- Anil Philip wrote: > > > Thank you for replying. > > Is there an example I can look at for transferring > > multiple files? > > I did a google search but was unable. > > thanks, > > Anil > > > > --- "Anderson, Rob (Global Trade)" > > wrote: > > > > > The wildcard is not resolved in ant. This is a > > > common mistake as people > > > expect Ant to resolve wildcards as a shell > would. > > > You would need to use > > > a fileset. > > > > > > -Rob Anderson > > > > > > > -----Original Message----- > > > > From: Anil Philip > > > [mailto:goodnewsforyou@yahoo.com] > > > > Sent: Wednesday, April 11, 2007 12:13 PM > > > > To: user@ant.apache.org > > > > Subject: help! how to send multiple files to > > > remote machine? ant-jsch > > > > > > > > Have you used scp to send the files from an > > entire > > > folder? > > > > Is there *another* way besides using > wildcards? > > > > I was sending it one file at a time and it > would > > > send two and > > > > then stop. > > > > I am trying to get it to send all the files at > > > once. > > > > But when I specify > > > > D:\outbound\* > > > > then I get > > > > > > > > java.io.FileNotFoundException: D:\outbound\* > > (The > > > filename, > > > > directory name, or volume label syntax is > > > > incorrect) > > > > > > > > at > > > > > > > > > > org.apache.tools.ant.taskdefs.optional.ssh.Scp.execute(Scp.java:215) > > > > > > > > - > > > > > > > > thanks, > > > > > > > > Anil Philip > > > > > > > > > > > > void sendFiles(File outFolder) throws > > > IOException { > > > > Scp sendFile = new Scp(); > > > > Project proj = new Project(); > > > > proj.init(); > > > > sendFile.setProject(proj); > > > > sendFile.setPort(22); > > > > sendFile.setTrust(true); > > > > sendFile.setFile(outFolder.getPath() + > > > File.separator + "*"); > > > > String hostUri = remoteUserName + "@" > + > > > remoteUrl + > > > > ":" + remotePath; > > > > sendFile.setTodir(hostUri); > > > > sendFile.setKeyfile(remoteKeyFile); > > > > sendFile.setPassphrase(""); > > > > logger.debug("about to SCP the file " > + > > > > outFolder.getName() + " > > > > to Sprint"); > > > > sendFile.execute(); > > > > // send all files in the out dir > > > > // Move the file to the done directory > > > > File[] files = outFolder.listFiles(); > > > > for(File outFile:files) { > > > > copy(outFile,new > > > > File(sentFolder.getAbsolutePath() + > > File.separator > > > + > > > > outFile.getName())); > > > > outFile.delete(); > > > > if(outFile.exists()) > > > > logger.error("Failed to move > the > > > file" > > > > + > > > > outFile.getName() + " to the done directory"); > > > > else > > > > logger.debug("Moved the file " > + > > > > outFile.getName() + " > > > > to the done directory"); > > > > } > > > > } > > > > > > > > > > > > > > > > > > > > > > ______________________________________________________________ > > > > ______________________ > > > > Sucker-punch spam with award-winning > protection. > > > > > > Try the free Yahoo! Mail Beta. > > > > > > > > > > http://advision.webevents.yahoo.com/mailbeta/features_spam.html > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: > > > user-unsubscribe@ant.apache.org For > > > > additional commands, e-mail: > > > user-help@ant.apache.org > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: > > > user-unsubscribe@ant.apache.org > > > For additional commands, e-mail: > > > user-help@ant.apache.org > > > > > > > > > > > > > > > > > ____________________________________________________________________________________ > > Food fight? Enjoy some healthy debate > > in the Yahoo! Answers Food & Drink Q&A. > > > http://answers.yahoo.com/dir/?link=list&sid=396545367 > > > > > > > ____________________________________________________________________________________ > Don't pick lemons. > See all the new 2007 cars at Yahoo! Autos. > http://autos.yahoo.com/new_cars.html > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org