user2022204
user2022204

Reputation: 35

Checking file exists in a particular directory using Ant

I have file abc.txt and i need to check that file exists in suppose c:\test\abc.txt location

If true then I need to print some message else I need to perform some operation.

Upvotes: 0

Views: 1609

Answers (1)

MrsTang
MrsTang

Reputation: 3119

Best is to use ant <available ../> to fill a property and then either using ant-contrib <if> task or create separate targets that run depending on the property value.

Check this answer for details: Ant task to run an Ant target only if a file exists?

Upvotes: 1

Related Questions