Hello, My problem is not so much with slashes and back-slashes (which i am quite used to deal with), but rather with spaces in filenames which are unfriendly with fileset. With <resourcelist><file file=.../></resourcelist> or with <files> resource collections, I don't see how to set the equivalent to the <filelist> "dir" attribute to make it work properly with <copy>.
Rgds, Patrick On Thu, Jun 24, 2010 at 6:22 PM, Martin Gainty <mgai...@hotmail.com> wrote: > > Good Afternoon Patrick- > > > > Ant uses the filesystem which is provided by the Operating System > > so if your on Windows using NTFS and your installation folder for program > fubar was installed at C:\Program Files (C:\Program Files\fubar) > which would map to > C:\PROGRA~1\fubar > > but in the case of Ant,Maven (and every other utility developed under Unix) > and ported to Windows then use back-slashes e.g. > > C:/PROGRA~1/fubar > > > > in the case of an UNC name you can use a Machine and ShareName > > \\Machine\ShareName > > > hth > Martin > ______________________________________________ > Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité > > Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger > sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung > oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich > dem Austausch von Informationen und entfaltet keine rechtliche > Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen > wir keine Haftung fuer den Inhalt uebernehmen. > > Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le > destinataire prévu, nous te demandons avec bonté que pour satisfaire informez > l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci > est interdite. Ce message sert à l'information seulement et n'aura pas > n'importe quel effet légalement obligatoire. Étant donné que les email > peuvent facilement être sujets à la manipulation, nous ne pouvons accepter > aucune responsabilité pour le contenu fourni. > > > > > >> Date: Thu, 24 Jun 2010 17:50:23 +0200 >> Subject: Copying a static list of files >> From: antu...@gmail.com >> To: user@ant.apache.org >> >> Hello, >> >> I want to copy a big number of files located on a remote server. >> To avoid scanning the remote directory, I use a locally generated list >> of absolute file names in a file called fileList.txt. >> >> So my fileList.txt contains something like: >> \\machine\share\dir1\dir2\file1.ext >> \\machine\share\dir1\dir2\file with spaces.ext >> \\machine\share\dir1\dir2\an other one.ext >> \\machine\share\dir1\file3.ext >> >> Now I want to copy some content of \\machine\share\dir1\dir2 in a >> target folder (eg file*.ext). >> >> I first thought of using filelist, but I get into problems with spaces >> in file names. >> <loadfile property="file.list" srcfile="fileList.txt"> >> <filterchain> >> <!-- matching and removing prefix \\machine\share\dir1\dir2 --> >> ..... >> </filterchain> >> </loadfile> >> <copy todir="target"> >> <restrict> >> <filelist dir="\\machine\share\dir1\dir2" files="${file.list}" /> >> <and> >> <or> >> <name name="${include.pattern.1}" /> >> <name name="${include.pattern.2}" /> >> </or> >> <not> >> <or> >> <name name="${exclude.pattern.1}" /> >> <name name="${exclude.pattern.2}" /> >> </or> >> </not> >> </and> >> </restrict> >> </copy> >> >> Then I tried to use the <files> resource collection with its >> includesfile attribute, but I don't see how to specify the equivalent >> of the <filelist> dir attribute. I even tried something with >> <mappedresources>, without chance (nothing gets copied): >> <copy todir="target"> >> <restrict> >> <mappedresources> >> <files includesfile="fileList.txt" /> >> <globmapper from="\\machine\share\dir1\dir2\*" to="*" handledirsep="true" /> >> </mappedresources> >> <and> >> <or> >> <name name="${include.pattern.1}" /> >> <name name="${include.pattern.2}" /> >> </or> >> <not> >> <or> >> <name name="${exclude.pattern.1}" /> >> <name name="${exclude.pattern.2}" /> >> </or> >> </not> >> </and> >> </restrict> >> </copy> >> >> would anyone have an idea? >> >> Thanks, >> >> Patrick >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscr...@ant.apache.org >> For additional commands, e-mail: user-h...@ant.apache.org >> > > _________________________________________________________________ > Hotmail is redefining busy with tools for the New Busy. Get more from your > inbox. > http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2 --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org