Page 1 of 1

Alias File names ?

Posted: 23 Sep 2016 20:20
by CookieMonster
Is it possible to keep the original file name but in XY give the file name an alias for easier understanding of the file ?

Re: Alias File names ?

Posted: 23 Sep 2016 20:31
by highend
@a=<path + file name>?

Re: Alias File names ?

Posted: 23 Sep 2016 21:04
by bdeshi
CookieMonster wrote:for easier understanding of the file ?
Um... you could use Tags. And comments. And custom columns. And extra columns.

Re: Alias File names ?

Posted: 24 Sep 2016 02:49
by CookieMonster
highend wrote:@a=<path + file name>?
I searched in the help but couldn't find any info on aliases; where can I find this info on usage etc ?

Re: Alias File names ?

Posted: 24 Sep 2016 05:47
by bdeshi
Type "aliases" in the Index tab of the help window.

or paste this in rhe addressbar and press enter

Code: Select all

::help 'idh_addressbar.htm#idh_alias';

Re: Alias File names ?

Posted: 25 Sep 2016 02:19
by CookieMonster
@rgex="expressions <@1>"

I have a question, are Arguments extra names you can use to find aliases ? And is the above method a valid argument ?

Re: Alias File names ?

Posted: 25 Sep 2016 07:43
by bdeshi
No. Arguments replace placeholders within the alias.
In the alias definition the arguments are referred to by placeholders <@1>, <@2>, <@3> etc. When using the alias, pass the arguments as a comma separated list after the alias name, separated by a space. Then <@1> in the alias is replaced with the first argument, <@2> with the second, etc.

Code: Select all

Define alias:    @xydata=%appdata%\XYplorer\<@1>  | this an alias definition with one argument
Use alias:       @xydata Scripts                  | here "Scripts" is the argument value
Resolved alias:  %appdata%\XYplorer\Scripts       | <@1> was replaced by given value


Define alias:    @Greet=::echo "Hello, <@1>! It's <@2>!";
                                        ^-----------^------placeholders in the alias ---------\
Use alias:       @Greet Don, Daisy                                                             |
                 ^------^----^-------@aliasname argu,ments                                     |
Resolved alias:  ::echo "Hello, Don! It's Daisy!";                                             |
                                ^---------^--------placeholders replaced with given values ----/