How to skip missing path message window in a command macro

I have a button that uses a little command to show me a local path on the left side and a network path on the right side like this:
Go "E:\Projects" OPENINLEFT
Go "Y:\Export\Projects" OPENINRIGHT
When the network path is absent I get the message window "can not find the path". How to skip this message window automatically and leave the right side of the lister unchanged?

You can use @ifexists to test if the path exists before running the Go command.

Go "E:\Projects" OPENINLEFT
@ifexists:Y:\Export\Projects
Go "Y:\Export\Projects" OPENINRIGHT

I never had a quicker reply! Awesome!
And: it works!
Thank you very much!

I thought it would be easy to set the sortorder on both sides of the lister to SORTBY=name. I tried different things to get it done. First one was:
Go "E:\Projects" OPENINLEFT Set SORTBY=name
@ifexists:Y:\Export\Projects
Go "Y:\Export\Projects" OPENINRIGHT Set SORTBY=name
It seems, that every time only one of the file lists gets the command, but every time the other one. So I tried it with @ifset:else Set SORTBY=name, tried it with @useactivelister and also tried an older tip from Leo ( Set SOURCE=right dopusrt /cmd Set SORTBY=modified ) but also with no success.
How to get both sides sorted by name. Please help!

Do you ever want to not sort by name when in those two folders? Or do you only want to sort by name in those two folders when you go to them using this special button?

I want to sort only by name if I hit this button. It shall secure that the folders will be sorted by name regardless which sortorder was active in the previous folders, before I hit the button.

Here's one way to do it:

@ifexists:Y:\Export\Projects
Go "Y:\Export\Projects" OPENINRIGHT
Set SOURCE=right
Set SORTBY=modified
@ifexists:E:\Projects
Go "E:\Projects" OPENINLEFT
Set SOURCE=left
Set SORTBY=modified

Using a lister style may be easier if you find you need more things, since that lets you save various properties of the lister and then apply them in a single line.

This one works, Leo. I don´t know why. It is only another order than in my tests, I pointed to the left lister at first, you to the right. And you ask on both sides if the path exists. Thank you very much! But I thought you are Australian. It is after midnight in Australia. When do you sleep?

That isn't the only difference.

The order only matters for which side ends up being active at the end.

The main difference is the two extra lines activating each side before setting that side to sort in a different way.

It's only 5pm where I am, but it's true I never sleep. :smiley: