Products | About Us

Using an environment variable

Is it possible to use an environment variable in the Write File action line as part of the file name?
Example: \\Servername\share\ENV_VAR-?SN?.txt (where ENV_VAR = the envirnoment variable)
I might be able to just use the machine name and get by with that, but it uses the IP address instead of the actual name. Any suggestions are appreciated.
Thanks,
Tim

Tim Wilson
11th Sep 2007

Tim,

You can do this with the Script action using wscript.shell and the ExpandEnvironmentStrings method.

However I don't know if this is going to help you, the environment variables will be read from the machine Print Distributor is running on and in the context of the localsystem account rather than the user who spooled the job.

Tony Edgecombe
11th Sep 2007

Feed