3

How to change directory (CD) using ant script?Is there any task in ant which does: cd

Monty
  • 53
  • 1
  • 2
  • 6

1 Answers1

1

There is no way to do this in Java.

See Changing the current working directory in Java?

So ant can't do it either.

Current dir can only be changed for nested tasks like java forked in separate process with fork="yes".

Community
  • 1
  • 1
Vadzim
  • 24,954
  • 11
  • 143
  • 151
  • You can use `exec` to run some script that changes it's own current dir. But it would not reflect on ant's current dir. – Vadzim Oct 01 '12 at 06:04
  • I got a shell script in another directory and I want to execute it. – Monty Oct 01 '12 at 06:31