>In order to create a simple to use backup program for SQL data, I'd like to pass the SQL Server (SQLDMO.Backup) the name of a directory in the calling computer where the backup file should go. This should be in the form \\MachineName\DiskShareName\DirName.
>
>I pressume that GETENV('COMPUTERNAME') will return the machine name.
>How can I get the share name of a disk programmatically? Bear in mind that in our case it is usually changed and not "C".
>
>Thanks you very much.
If using file system object is not an option, you can always
run net use >netuse.txt
lcUsed=filetostr("netuse.txt")
Of course, the more elegant way would be to use late Ed Rauh's API_APPRUN class instead of the run command, so you don't get pathing problems (are you really sure in which directory will the run command run?) and the ugly black window while it runs.
And then just parse the string.
Hey, I didn't say it was easy :).