>I have a VFP7 application that resides on a network server. Users have a desktop icon that points to the executable and runtimes.
>
>The application is also accessible through a Citrix metaframe client which means that someone can run the application without access to a local drive.
>
>There are numerous instances in the application where the user creates temporary tables. Even though there is a small performance penalty, I want to ensure that an individual's temporary cursors never occur in the same folder as another users. All users (both networked and Citrix) users have access to a private network share of "H:\TMP". I would like to set this as the default temporary file path for my application. I have the TMPFILES="H:\TMP" statement in the config.fpw file on the server, but I'm not sure that it's really working for all workstations.
>
>Is there a way to specify the TMPFILES path in code? I've searched the VFP docs and tried a bunch of things (all with various syntax errors).
I've just checked where my Citrix creates temp files, without any config.fpw, and it's on the server's c:\docume~1\{username here}\temp\2. I've also created a cursor, and checked its dbf() - it's in the same directory. Getenv("TMP") gives the same directory. Since this type of directory is created by OS for each user, I think you can just leave it as is.
If you really want to put them all into the same directory, you'd either need to create a config.fpw for your application (and include it in the exe), or set the TMP=H:\tmp in the login script, or both. Though, I'm not sure I'd put them all in the same place - there's a chance that somehow two users would try to create two files with the same name. It doesn't have to be the impossible "at the same microsecond", it's enough that one keeps his open, and the other tries to create it. So it's better to keep them in their private directories, IMO.