Can I use @ifexists with external control codes?

Why does this (executed as Standard Function) always result in "false"?

say true
say false

when the path, ideed, does exist? The only way I was successful to use @ifexists was by literally writing out the path, but I had to do it without quotes, which I also found strange.

Yes, I know, I could do this easily as script, but this way it would be even more easy.

What I want to achieve, in the end, would be to modify the Delete, Move and Move As buttons to check, whether the selected files are in a Git repository, and if so, let Git (mv/rm) execute the actions, and if not, let DOpus do it.

say provided by @tbone's

1 Like

You can't use {...} codes in @modifiers, at least not ones that handle conditional execution, because the @modifiers are processed to work out which lines will be run before the {...} codes are processed. You'd need to use a script to do that kind of conditional logic.

Okay, thanks.

Would be nice, though, if this could be made to work in an update. Writing a script in such a case is just overkill. Couldn't those {...} codes, which are guaranteed to be fixed values, allowed? I mean, {sourcepath} and {destinationpath} should be pretty static?

1 Like

I agree, I thought this was a bug. This would be really useful.