Don't know if this will help you, but are you aware that you can use to
string together commands onto one line... this is at least true on Windows
2000, not sure about NT.
From the command reference:
The ampersand () separates multiple commands on one command line.
The parentheses groups
- Original Message -
From: Frank E. Weiss [EMAIL PROTECTED]
To: Ant Users List [EMAIL PROTECTED]
Sent: Wednesday, December 12, 2001 4:23 AM
Subject: Re: pushd and popd
[EMAIL PROTECTED] wrote:
Unfortunately, Java does not support the notion of a changeable current
process
was
to pushd the UNC path, copy to the new drive that pushd assigns, then popd
when I'm done.
However by reading the various responses, it looks like Ant wouldn't leave
me in the drive that pushd would assign. Is this correct? Is there a way
for me to work around this aspect of Ant? Would I be better
- Original Message -
From: Anthony Rodriguez [EMAIL PROTECTED]
To: 'Ant Users List' [EMAIL PROTECTED]
Sent: Wednesday, December 12, 2001 10:16 AM
Subject: RE: pushd and popd
What I'm really trying to acheive here is to map a network path to a drive
letter, then copy files
this happen whenever you run
something using cmd?
-Anthony
-Original Message-
From: Anthony Rodriguez [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 12, 2001 10:16 AM
To: 'Ant Users List'
Subject: RE: pushd and popd
What I'm really trying to acheive here is to map a network
--- [EMAIL PROTECTED] wrote:
If you need pushd/popd only to change into another dir and do a quick
command or two from there, the cmd /c pusd ... other command
syntax may do the trick.
If you're just wanting to execute a command in a directory other than the
current one, you can specify
?
-Anthony
-Original Message-
From: Anthony Rodriguez [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 12, 2001 10:16 AM
To: 'Ant Users List'
Subject: RE: pushd and popd
What I'm really trying to acheive here is to map a network
path to a drive
letter, then copy files
that are specific and necessary to my environment. So the idea was
to pushd the UNC path, copy to the new drive that pushd assigns, then popd
when I'm done.
Wouldn't net use z: \\server\share get you what you need? You could
use the exec task to map the drive then use copy
--
Jesse Stockall
'
Subject: RE: pushd and popd
OK. I have resolved that Ant will not do this properly.
However, this can
be done in a batch file. So now the question I have is, how
do I get a
newline with the echo task?
target name=write_bat
echo file=c:\antdir\test.bat message=pushd
\\server
Has anyone had any luck using the Win 2000 programs, pushd and popd? I'm
trying to use it in my build.xml but it's not working.
build.xml:
--
target name=pushpop
exec executable=pushd
arg line=\\${server}\${testdir}\/
/exec
exec executable=popd/
/target
Here are my
--- Anthony Rodriguez [EMAIL PROTECTED] wrote:
Has anyone had any luck using the Win 2000 programs, pushd and popd?
Most likely they're built-ins rather than executables, so you'd need to
exec DOS's command shell, with pushd/popd as args to it.
Diane
=
([EMAIL PROTECTED
December, 2001 03:59 PM
To: Ant Users List
Subject: Re: pushd and popd
--- Anthony Rodriguez [EMAIL PROTECTED] wrote:
Has anyone had any luck using the Win 2000 programs, pushd and popd?
Most likely they're built-ins rather than executables, so you'd need to
exec DOS's command shell, with pushd
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, December 11, 2001 5:53 PM
Subject: RE: pushd and popd
Diane is correct. It would look something like:
target name=pushpop
exec executable=cmd /c
arg line=pushd \\${server}\${testdir
process directory.
If you need pushd/popd only to change into another dir and do a quick
command or two from there, the cmd /c pusd ... other command syntax
may do the trick.
Vlad.
Please respond to Ant Users List [EMAIL PROTECTED]
To: Ant Users List [EMAIL PROTECTED]
cc:
Subject
December, 2001 03:59 PM
To: Ant Users List
Subject: Re: pushd and popd
--- Anthony Rodriguez [EMAIL PROTECTED] wrote:
Has anyone had any luck using the Win 2000 programs, pushd and popd?
Most likely they're built-ins rather than executables, so you'd need to
exec DOS's command shell, with pushd
[EMAIL PROTECTED] wrote:
Unfortunately, Java does not support the notion of a changeable current
process directory.
BINGO! That's why ant's implementation of exec is so twisted. People at Sun
are looking into fixing the JVM for java.lang.Runtime.exec() by adding a way
to set the subprocesses
Anthony,
What exactly are you trying to achieve?
pushd and popd are builtins to the Windows shell. This is why Ant cannot
execute them directly. The normal way around this would be to actually exec
cmd.exe and ask it to run the built-in.
In your case, however, the pushd and popd commands would
17 matches
Mail list logo