Loren, Could the problem be related to the PATH environment variable? Did you make sure you can execute your xcopy from the command line?
-- Edwin G. Castro Firing Systems Engineer [EMAIL PROTECTED] -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ian MacLean Sent: Tuesday, August 31, 2004 11:02 PM To: Ian MacLean Cc: NAnt Users List (E-mail); [EMAIL PROTECTED] Subject: Re: [Nant-users] [Fwd: Why can't NAnt seem to <exec> xcopy ?] Your example generates the following output for me with current cvs: it seems that both forms you presented work ok. Buildfile: file:///H:/dev/test/nant/x-copytest.build Target(s) specified: test test: [exec] Copies files and directory trees. [exec] [exec] XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/V] [/W] [exec] [/C] [/I] [/Q] [/F] [/L] [/G] [/H] [/R] [/T] [/U] [exec] [/K] [/N] [/O] [/X] [/Y] [/-Y] [/Z] [exec] [/EXCLUDE:file1[+file2][+file3]...] [exec] [exec] source Specifies the file(s) to copy. [exec] destination Specifies the location and/or name of new files. [exec] /A Copies only files with the archive attribute set, [exec] doesn't change the attribute. [exec] /M Copies only files with the archive attribute set, [exec] turns off the archive attribute. [exec] /D:m-d-y Copies files changed on or after the specified date. [exec] If no date is given, copies only those files whose [exec] source time is newer than the destination time. [exec] /EXCLUDE:file1[+file2][+file3]... [exec] Specifies a list of files containing strings. Each string [exec] should be in a separate line in the files. When any of the [exec] strings match any part of the absolute path of the file to be [exec] copied, that file will be excluded from being copied. For [exec] example, specifying a string like \obj\ or .obj will exclude [exec] all files underneath the directory obj or all files with the [exec] .obj extension respectively. [exec] /P Prompts you before creating each destination file. [exec] /S Copies directories and subdirectories except empty ones. [exec] /E Copies directories and subdirectories, including empty ones. [exec] Same as /S /E. May be used to modify /T. [exec] /V Verifies each new file. [exec] /W Prompts you to press a key before copying. [exec] /C Continues copying even if errors occur. [exec] /I If destination does not exist and copying more than one file, [exec] assumes that destination must be a directory. [exec] /Q Does not display file names while copying. [exec] /F Displays full source and destination file names while copying. [exec] /L Displays files that would be copied. [exec] /G Allows the copying of encrypted files to destination that does [exec] not support encryption. [exec] /H Copies hidden and system files also. [exec] /R Overwrites read-only files. [exec] /T Creates directory structure, but does not copy files. Does not [exec] include empty directories or subdirectories. /T /E includes [exec] empty directories and subdirectories. [exec] /U Copies only files that already exist in destination. [exec] /K Copies attributes. Normal Xcopy will reset read-only attributes. [exec] /N Copies using the generated short names. [exec] /O Copies file ownership and ACL information. [exec] /X Copies file audit settings (implies /O). [exec] /Y Suppresses prompting to confirm you want to overwrite an [exec] existing destination file. [exec] /-Y Causes prompting to confirm you want to overwrite an [exec] existing destination file. [exec] /Z Copies networked files in restartable mode. [exec] [exec] The switch /Y may be preset in the COPYCMD environment variable. [exec] This may be overridden with /-Y on the command line. [exec] Copies files and directory trees. [exec] [exec] XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/V] [/W] [exec] [/C] [/I] [/Q] [/F] [/L] [/G] [/H] [/R] [/T] [/U] [exec] [/K] [/N] [/O] [/X] [/Y] [/-Y] [/Z] [exec] [/EXCLUDE:file1[+file2][+file3]...] [exec] [exec] source Specifies the file(s) to copy. [exec] destination Specifies the location and/or name of new files. [exec] /A Copies only files with the archive attribute set, [exec] doesn't change the attribute. [exec] /M Copies only files with the archive attribute set, [exec] turns off the archive attribute. [exec] /D:m-d-y Copies files changed on or after the specified date. [exec] If no date is given, copies only those files whose [exec] source time is newer than the destination time. [exec] /EXCLUDE:file1[+file2][+file3]... [exec] Specifies a list of files containing strings. Each string [exec] should be in a separate line in the files. When any of the [exec] strings match any part of the absolute path of the file to be [exec] copied, that file will be excluded from being copied. For [exec] example, specifying a string like \obj\ or .obj will exclude [exec] all files underneath the directory obj or all files with the [exec] .obj extension respectively. [exec] /P Prompts you before creating each destination file. [exec] /S Copies directories and subdirectories except empty ones. [exec] /E Copies directories and subdirectories, including empty ones. [exec] Same as /S /E. May be used to modify /T. [exec] /V Verifies each new file. [exec] /W Prompts you to press a key before copying. [exec] /C Continues copying even if errors occur. [exec] /I If destination does not exist and copying more than one file, [exec] assumes that destination must be a directory. [exec] /Q Does not display file names while copying. [exec] /F Displays full source and destination file names while copying. [exec] /L Displays files that would be copied. [exec] /G Allows the copying of encrypted files to destination that does [exec] not support encryption. [exec] /H Copies hidden and system files also. [exec] /R Overwrites read-only files. [exec] /T Creates directory structure, but does not copy files. Does not [exec] include empty directories or subdirectories. /T /E includes [exec] empty directories and subdirectories. [exec] /U Copies only files that already exist in destination. [exec] /K Copies attributes. Normal Xcopy will reset read-only attributes. [exec] /N Copies using the generated short names. [exec] /O Copies file ownership and ACL information. [exec] /X Copies file audit settings (implies /O). [exec] /Y Suppresses prompting to confirm you want to overwrite an [exec] existing destination file. [exec] /-Y Causes prompting to confirm you want to overwrite an [exec] existing destination file. [exec] /Z Copies networked files in restartable mode. [exec] [exec] The switch /Y may be preset in the COPYCMD environment variable. [exec] This may be overridden with /-Y on the command line. BUILD SUCCEEDED Total time: 0.1 seconds. > > -------- Original Message -------- > Subject: Why can't NAnt seem to xcopy ? > Date: Tue, 31 Aug 2004 23:13:50 -0500 > From: Loren Halvorson <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > > > > I can't seem to get NAnt (0.84 or 0.85) to <exec> xcopy.exe no matter > what I try. It just silently fails to execute. > > <project name="test" default="test"> > <target name="test"> > <!-- neither this --> > <exec program="cmd" commandline="/c xcopy.exe /?" /> > <!-- nor this --> > <exec program="xcopy.exe" commandline="/?" /> > </target> > </project> > > The only thing I could get to work was this UGLY script: > > <property name="exec.program" value="xcopy.exe"/> > <property name="exec.arguments" value=""C:\src\" > "c:\dest\" /E /Y /Q"/> > <call target="exec"/> > > <target name="exec"> > <script language="C#"> > <imports> > <import name="System.Diagnostics"/> > </imports> > <code><![CDATA[ > public static void ScriptMain(Project project) { > Process p = new Process(); > p.StartInfo.FileName = > project.Properties["exec.program"]; > p.StartInfo.Arguments = > project.Properties["exec.arguments"]; > p.Start(); > p.WaitForExit(); > p.Close(); > } > ]]></code> > </script> > </target> > > I am trying to exec XCOPY because it can copy a tree much faster than > NAnt. > I am archiving a very large tree (~600 Meg), and using the recursive > fileset of the <copy> task is extremely slow. > > <!-- Copy using the <copy> task, took a LONG time (like 15 > minutes)! --> > <copy todir="${publish.dir}\archive"> > <fileset basedir="${base.dir}"> > <include name="**\*.*" /> > </fileset> > </copy> > > Has anyone figured out a fast way to copy a large tree? > > > -- Ian MacLean, Developer, ActiveState, a division of Sophos http://www.ActiveState.com ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click _______________________________________________ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_idP47&alloc_id808&op=click _______________________________________________ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users