I want to get the root folder in a Path which is stored in a variable.
b="Sports/Badminton/Players/Saina.txt"
Now i want to copy the file if root is "Sports"
if (b=="Sports")
{
(new AntBuilder()).copy(file: ("$gitPath/$file"), tofile: ("$ServerPath/$file"))
}
else { println "unknown file" }
Aucun commentaire:
Enregistrer un commentaire