>That will edit the file but I can't see how that will refresh the command window?
It won't, of course. But that's as simple as it gets without coding circles around VFP. You'd need to visit all the locations you have (presumably only those mentioned in your Environment Manager) where you have a resource file and a _command.prg, then find which one is the latest and then copy it over the one at home() - assuming you can do that before Fox loads the command window from it.
Alternately, on shutdown you can launch an exe which will sleep for a minute (so your shutdown gets the chance to write out the _command.prg, kill its temp files and generally clean up the house even on the slowest machine) and will then copy file _command.prg to forcepath("_command.prg", home()). The trouble with this approach is that you're a developer, and your On Shutdown command may be cleared a hundred times before you actually quit.
For me, it's actually better this way. I have about a dozen separate _command.prg files, each one of them containing only what I was doing last time, not two years' worth of junk. What I may need again goes into little .prg files in the .\stuff directory, which exists beneath every project's directory.
>>>I work on multiple projects and I have a startup program that allows me to select the project that I want to work on. In the help file it says that the command window saves its contents in the _command.prg file in the same directory as the resource file is in. Help also says that the _command.prg is read at startup. If I change the location of the resource file when I choose the project that I need to work on, how do I force the _command.prg file to be reread?
>>
>>modify command _command