tv_version "username" Topic is solved

A forum dedicated to George scripting questions
Post Reply
MightyNice
Posts: 10
Joined: 02 Jun 2023, 08:19

tv_version "username"

Post by MightyNice »

Hi,

In the docs, it mentions that

tv_version "username"

may be empty.

It is empty when I use this command on my mac, but returns username fine on windows. I want the username so that I can create files/folders in /Users/<username>/Documents on my mac.

Is this possible?

thanks
User avatar
Jeremy Richard
Posts: 53
Joined: 16 Oct 2021, 01:44
Contact:

Re: tv_version "username"

Post by Jeremy Richard »

As an alternative you could maybe use tv_getpath?

Code: Select all

tv_getpath home
tv_warn RESULT
tv_getpath home shows,
  • on Windows: C:\Users\MyUsername\Documents
  • on macOS: /Users/MyUsername
  • on Linux: /home/MyUsername
To have something like this (not tested):

Code: Select all

tv_getpath home
user_directory = RESULT
export_path = user_directory"/Documents"
MightyNice
Posts: 10
Joined: 02 Jun 2023, 08:19

Re: tv_version "username"

Post by MightyNice »

Thank you so much! That works!!

cheers,

Jason
Post Reply