I've chased my tail on this one for days. I need an expert.
I am modifying my vfp app to run from RDP. I am trying to cover every conceivable temp files issue meaning I want to simply not worry about 2 instances of my app using the same temp folder. My users can run multiple instances of my app simultaneously. To make a long story short, I am thinking...when my app starts up, if it could create a unique temp folder and then use that temp folder, there is no way there could be any issues with overlapping temp files. My app is run from a desktop icon with the -Cc:\<home dir>\config.itf (itf is the name of my app). The contents of config.itf is:
TMPFILES=.\temp\itf
The above gets me to where my app is storing temp files in a folder under the app's home named temp\itf
Basically I want to have each instance of the app create a subfolder under <home dir>\temp\itf
So if there were 3 instances of my app running there would be:
<home dir>\temp\itf\instance1
<home dir>\temp\itf\instance2
<home dir>\temp\itf\instance3
I have gotten this far:
modify the config file to run a separate prg named createthisinstancestempfolder.fxp
The contents of createthisinstancestempfolder.prg is:
lcdirtocreate=SYS(2015)
MKDIR (lcdirtocreate)
Modify config.itf to be as follows:
RUN do createthisinstancestempfolder
So in the config file I am telling VFP to run my program that gets a unique name and creates the temp folder. That works.
But, now I need to HAVE that folder name so the next line in the config file can be:
TMPFILES=<the name of the temp folder I just created>
I can't see a way to do that.
Thanks for your thoughts,
John
I am modifying my vfp app to run from RDP. I am trying to cover every conceivable temp files issue meaning I want to simply not worry about 2 instances of my app using the same temp folder. My users can run multiple instances of my app simultaneously. To make a long story short, I am thinking...when my app starts up, if it could create a unique temp folder and then use that temp folder, there is no way there could be any issues with overlapping temp files. My app is run from a desktop icon with the -Cc:\<home dir>\config.itf (itf is the name of my app). The contents of config.itf is:
TMPFILES=.\temp\itf
The above gets me to where my app is storing temp files in a folder under the app's home named temp\itf
Basically I want to have each instance of the app create a subfolder under <home dir>\temp\itf
So if there were 3 instances of my app running there would be:
<home dir>\temp\itf\instance1
<home dir>\temp\itf\instance2
<home dir>\temp\itf\instance3
I have gotten this far:
modify the config file to run a separate prg named createthisinstancestempfolder.fxp
The contents of createthisinstancestempfolder.prg is:
lcdirtocreate=SYS(2015)
MKDIR (lcdirtocreate)
Modify config.itf to be as follows:
RUN do createthisinstancestempfolder
So in the config file I am telling VFP to run my program that gets a unique name and creates the temp folder. That works.
But, now I need to HAVE that folder name so the next line in the config file can be:
TMPFILES=<the name of the temp folder I just created>
I can't see a way to do that.
Thanks for your thoughts,
John