NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Macros


Joined: 24 Nov 2009
Posts: 5
Reply with quote
How to get real relative path to file from project root?
example:
file places in "proj_path/any_folder/my_file.php"
i need to receive "any_folder/my_file.php"
standart macro @RelFName@ returns "/any_folder/my_file.php"

p.s. where to get list of all macros (ex @CVSRelative@ etc) ???
View user's profileFind all posts by romka777Send private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
I think the easiest way for you would be to develop a simple php script, run it with full project path, fill file name, and calculate the rest in the script. Don't forget to surround the macros with double quotes:
Execute With: Shell
Command line: @php@ "path\to\script" "@ProjRoot@" "@FName@"

To see full list of the macros you may want to click [Show Macros] button in the bottom left corner.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 24 Nov 2009
Posts: 5
Reply with quote
Show macros do not show all macroses, for example i know about @CVSRelative@ only from standart comands.
View user's profileFind all posts by romka777Send private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
@CVSRelative@ macro is indeed supported but only if Execute With => CVS is selected.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 24 Nov 2009
Posts: 5
Reply with quote
So, where i can list of all these macroses ?
View user's profileFind all posts by romka777Send private message
Macros
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic