In a job shop setting I have a template folder structure with some starter programs in various locations, a fresh copy of the tree is used for each job. This means we have a prg in the corresponding folder under each job folder with the same name. Like:
We use mapped network drives and relative pathing all over the place, and have for many years. As a habit, we also close files and set the default directory to start off a program. Just recently, VFP9 seems to be ‘remembering’ the prior same-named program run regardless of the default directory or search path. Like:
This happens even after restarting fox or rebooting (first run is ok, second job picks up the first, and works vice-versa. I’ve played around with deleting/compiling anew each time as well as using CLOSE ALL, CLEAR ALL, and SYS(1104) in between … nothing works. No program editor windows are open. There is no other same-named program or compiled program in the search path, windows temp folder (or default directory) as shown by SYS(2019) or set(“path”).
I've removed (renamed) the previous job folder before running the second one with the thinking that it would surface a file not found error ... but instead it then behaves and runs the correct one from the default directory!
At this point, I literally have the first line of the program identifying it’s current directory and then the very next line of code identifies itself (001 or 002 respectively). It shows that it is indeed in the correct default directory just set, but then shows the wrong program is running, like:
Command Window:
First two lines in prg:
Displays:
I just don't understand how this could be. As stable as VFP9 is, this issue must ultimately tie in to Windows somehow, but I'm at a loss. What would cause a recently-run same-named program to run instead of the one in the current default directory?
Many thanks in advance
P:\ABC\001\some.prg
P:\ABC\002\some.prg
P:\ABC\002\some.prg
We use mapped network drives and relative pathing all over the place, and have for many years. As a habit, we also close files and set the default directory to start off a program. Just recently, VFP9 seems to be ‘remembering’ the prior same-named program run regardless of the default directory or search path. Like:
SET DEFA TO P:\ABC\001DO some && runs ok
SET DEFA TO P:\ABC\002DO some && runs the prg from ‘001’ folder
SET DEFA TO P:\ABC\002DO some && runs the prg from ‘001’ folder
This happens even after restarting fox or rebooting (first run is ok, second job picks up the first, and works vice-versa. I’ve played around with deleting/compiling anew each time as well as using CLOSE ALL, CLEAR ALL, and SYS(1104) in between … nothing works. No program editor windows are open. There is no other same-named program or compiled program in the search path, windows temp folder (or default directory) as shown by SYS(2019) or set(“path”).
I've removed (renamed) the previous job folder before running the second one with the thinking that it would surface a file not found error ... but instead it then behaves and runs the correct one from the default directory!
At this point, I literally have the first line of the program identifying it’s current directory and then the very next line of code identifies itself (001 or 002 respectively). It shows that it is indeed in the correct default directory just set, but then shows the wrong program is running, like:
Command Window:
SET DEFA TO P:\ABC\002? CURDIR() && shows \ABC\002DO some
First two lines in prg:
? CURDIR()
?"002"
?"002"
Displays:
\ABC\002001
I just don't understand how this could be. As stable as VFP9 is, this issue must ultimately tie in to Windows somehow, but I'm at a loss. What would cause a recently-run same-named program to run instead of the one in the current default directory?
Many thanks in advance