Share via

Multiple Values for a single Local-Variable (Second value be used as an alternative when first one invalid)

Anonymous
2023-10-06T20:25:05+00:00

Hello everyone. I use many services that use XDG (mainly AI projects) and these projects cache of XDG can be huge in size. The cache location can be manually defined with XDG_CACHE_HOME a user-variable. I was wondering, is there a way to define an alternative for an environment variable? If the first value was not available, try the seconds value, something like this.

This is because I use Whisper for speech recognition, and Godot for making game, and I store the project whisper files in an external drive which the project is stored on it as well. meanwhile I don't connect this Drive to my system all the time and Godot throws errors for not being able to write to that directory. Please stick to Environment-Variable solutions as I don't want to find a settings in every program that has this issue.I'm also okay with running PowerShell scripts to fix this.

utterly unnecessary Info in case someone asks: Laptop, Ryzen 4800h, 2060m, 16GB RAM... running latest windows 10 updates and I have access admin access to the system

Windows for home | Windows 10 | Settings

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Jonathan Deives 74,060 Reputation points Independent Advisor
    2023-10-06T21:29:42+00:00

    My name is Jonathan Deives. I'm an Independent Advisor and I'll be glad to help you today.

    This forum is for casual users, as your question is more complex, please use the Microsoft Q&A Forum (The System Administrators and IT Pro Forum) where they can help you better.

    https://learn.microsoft.com/en-us/answers/quest...

    Was this answer helpful?

    0 comments No comments