Jump to content

Using Environment Variables In INI File


tijiez
 Share

Recommended Posts

Is there a way to read %tmp%\file.ext from an INI file in a way that AutoIt will understand it as @TempDir?

For Example:

If I used iniread of file (from below) and my string was equal to "%tmp%\file.ext", how could I then do FileDelete() on that string. It's not understanding %tmp% as the temporary directory...

[sECTION]

File=%tmp%\file.ext

Link to comment
Share on other sites

  • 3 weeks later...

Although, just be aware that it will then expand env variables for the rest of the script. In other words, if you needed to actually enter any string text with two % symbols such as "%tmp%" it will now treat it as an expandible variable nomatter what. You'd have to work around that if you needed to use it in a string elsewhere. (ex. "%" & "tmp" & "%")

Just FYI.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...