>>>>I am working on a small app that is to reside on a network. When the user runs the app, they select the types of information they need and based on this various tables and other files are to be copied to a directory on the users local drive. How do I determine what the local drive letter is?
>>>
>>>Hi Colin,
>>>
>>>Well, it depends on which version of VFP you're running. In 6.0 DRIVETYPE() was added to the language. Previously, the same function is in Foxtools. You can either loop through and check each drive letter to see if it's a local hard drive, or use an API call (either GetLogicalDrives() or GetLogicalDriveStrings()) to get the valid drive letters.
>>
>>Thanks George. I do have VFP 6. I am looping through A to Z using DRIVETYPE() function and when it returns 3 using DIRECTORY() funtion to see if valid directory exists. If so, I've got the drive letter needed. Works great. Thanx again.
>
>You're welcome, Colin. Glad to be of help.
>
>BTW, SYS(5) returns the current default directory (which, depending on circumstances) may or may not return the network drive if that's where the app is located.
Actually, (from VFP Help) "SYS(5) returns the default drive. SYS(2003) returns the default directory with no drive designator. SYS(5) + SYS(2003) returns the default drive and the directory."
I'm pretty sure you know this and this is what you meant but I thought I'd clarify for anyone else following this thread.
Thanx again.
Colin Magee
Team Leader, Systems Development
Metroland Media Group Ltd.
Mississauga, Ontario, Canada
cmagee@metroland.comNever mistake having a career with having a life.