Alias File names ?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
CookieMonster

Alias File names ?

Post 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 ?

highend
Posts: 14996
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Alias File names ?

Post by highend »

@a=<path + file name>?
One of my scripts helped you out? Please donate via Paypal

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: Alias File names ?

Post by bdeshi »

CookieMonster wrote:for easier understanding of the file ?
Um... you could use Tags. And comments. And custom columns. And extra columns.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

CookieMonster

Re: Alias File names ?

Post 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 ?

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: Alias File names ?

Post 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';
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

CookieMonster

Re: Alias File names ?

Post 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 ?

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: Alias File names ?

Post 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 ----/

Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

Post Reply