>Can you set your default directory to a network server name? For example, "Set Default To //myserver/apps/myprog" I do this in VFP6 and when I set a variable to it, say lcMyProgDir, then run a command like "set defa to &lcMyProgDir" in my program, I receive an error "Invalid Path or FileName."
Yes, but you have to format things properly, and use UNCs properly. First, the separator character should be
\ rather than
/ in the UNC, and if there are spaces or other special characters, you're much better off use name resolution rather than macroexpansion to avoid parsing problems.
Second a UNC uses a server and share name, not the name of a server and the path on the local machine. Once the \\server\share is specified, you can use relative pathing to the share.
lcMyProgDir = "\\MyServer\MyShareName\apps Dir\The Programs"
*
* I intentionally made a path that macro expansion can't work with
* in the example above
*
SET DEFAULT TO (lcMyProgDir)
Also, you need VFP 5 or later to use this - VFP 3 had some problems with UNCs.