Command failed (Relevance substitution error.) using parameters

Hello,

I’m getting the Relevance substitution error in the if statement where it looks like it has the correct syntaxis, please see the following code

parameter “currentUser” = “{name of current user}”
parameter “cacheDir” = “\AppData\Roaming\Microsoft\Windows\Themes\CachedFiles”
parameter “transcode” = “\AppData\Roaming\Microsoft\Windows\Themes\TranscodedWallpaper”
parameter “cachedFiles” = “c:\users{parameter “currentUser”}{parameter “cacheDir”}”
parameter “TranscodedWallpaper” = “c:\users{parameter “currentUser”}{parameter “transcode”}”

if{ not exists folders {parameter “cachedFiles”}}
//code here
endif

error from the client:

any idea?

Thanks

You can’t have relevance substitution (i.e { } ) nested inside relevance substitution.
try:

if{ not exists folders (parameter “cachedFiles”)}
//code here
endif
3 Likes

Thank you @cstoneba it works fine