Solved Using Windows environment variable APPDATA

General discussion forum about all things Team Developer 6.x
Dobby
Germany
Posts: 3
Joined: 24 Apr 2017, 11:52
Location: Salem Germany

Using Windows environment variable APPDATA

Post by Dobby » 05 May 2017, 14:53

Hello folks,

can anybody tell me how I can use the %APPDATA% variable from within my code?

I tried to create a directory by givin '%APPDATA%\\newdirname'

But that created me a directory calld %APPDATA% within the directory the app was started. :-(

Any hints?

Thx
Ulf
Last edited by Dobby on 05 May 2017, 17:11, edited 1 time in total.

User avatar
Charlie
Canada
Posts: 54
Joined: 07 Mar 2017, 18:52
Location: Fredericton, New Brunswick, Canada

Re: Using Windwos environment variable APPDATA

Post by Charlie » 05 May 2017, 15:54

G'day,

"APPDATA" is an environment variable.

I think you get the value of environment variables with the VisDosGetEnvString function.
A little trick to help direct folk from old Gupta forum to this one: Link to post

Uwe van der Horst
Site Admin
Site Admin
Germany
Posts: 59
Joined: 05 Mar 2017, 14:21
Location: Wetter (Ruhr), Germany

Re: Using Windwos environment variable APPDATA

Post by Uwe van der Horst » 05 May 2017, 15:57

Hi Ulf,

this link should help (you will find a sample):

http://wiki.tdcommunity.net/index.ph ... al_folders
Best regards,
Uwe van der Horst
Advo-web GmbH

Dobby
Germany
Posts: 3
Joined: 24 Apr 2017, 11:52
Location: Salem Germany

SOLVED Re: Using Windwos environment variable APPDATA

Post by Dobby » 05 May 2017, 17:11

Hello Charlie, hello Uwe,

thanks for the quick answer.

Both are good solutions.

I picked the VisDosGetEnvString for it was the simplest one. :-)

It's good to have this forum. Thx.

Ulf

Return to “General Discussion”

Who is online

Users browsing this forum: Ccbot [Crawler] and 0 guests