How to remove a part of macro in External tool macros

Answered

I would like to use the below command in the External tool.

sh execUnitTest.sh -f UserClass/Shop.php

 

So, I tried to make the below in the External Tool.

sh execUnitTest.sh -f $FileDirRelativeToProjectRoot$/$FileName$

 

But, because the project root is not "UserClass", the below command was run.

sh execUnitTest.sh -f ProjectRoot/source/UserClass/Shop.php

 

Could you tell me how to remove the unnecessary path "ProjectRoot/source/"?

0
3 comments

There is FileDirName macro.

1
Avatar
Permanently deleted user

Thank you for answering my question!

In this case, I could resolve my problem!!

 

But in some case, 

ProjectRoot/source/UserClass/Shops/AAAShop.php

 

In this case, I want to get the path "UserClass/Shops/AAAShop.php" not "Shops/AAAShop.php".

 

Is there any way both of following are good?

ProjectRoot/source/UserClass/Shop.php -> UserClass/AAAShop.php

ProjectRoot/source/UserClass/Shops/AAAShop.php -> UserClass/Shops/AAAShop.php

0

Please sign in to leave a comment.