Wiki Home

Vfp Unc

Namespace: WIN_COM_API
VFP supports UNC names ( \\servername\sharename\path\path\path\file.ext ) in many ways:

USE \\server\share\path\table.dbf

However, I never tried this before, but this actually works:

CD \\Server\Share\Path\Path\Path

Now, these functions return the following:


However, if you try to start a DOS command shell now, it won't start, because the default drive is invalid.

So, VFP really supports UNC!

Set Default

FoxPro requires requires read access to the parent the folder mentioned in Set Default. For example
SET DEFAULT TO \\Servername\The\Lord\of\the\Rings\

The user running the code would need read access to \\Servername\The\Lord\of\the as well as \\Servername\The\Lord\of\the\Rings. Otherwise you would receive a 'Invalid path or file name.' error.

See also: Set Directory
( Topic last updated: 2017.04.04 11:34:12 AM )