Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get the drive letter
Message
From
05/05/2008 09:28:31
 
 
General information
Forum:
Visual FoxPro
Category:
Project manager
Miscellaneous
Thread ID:
01314645
Message ID:
01315090
Views:
18
>When I open the project as a DBF I'm looking at the field 'name' but sometimes it has '.../dir1/test.prg' instead of the drive and fullpath. How can I get the drive and full path?
>
>Thanks.

If you open PJX with USE, Justpath(DBF()) will give you the homepath, then add "\" and the relative path of the Name field and use Fullpath() on that:

If the alias for the project workarea is "yourproject"
? Fullpath(Addbs(Justpath(dbf("yourproject")))+yourproject.name)
If you have the project opened in the vfp IDE it's even simpler, as _vfp.activeproject.Files(n).name with n between 1 and _vfp.activeproject.Files.Count will give you the file names of project files. Or even simpler:
For Each loFile in _vfp.activeproject.Files
    ? loFile.name
endfor
Bye, Olaf.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform