Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to find share name of a disk programmatically?
Message
De
14/04/2004 01:29:52
 
 
À
14/04/2004 00:22:05
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00894627
Message ID:
00894676
Vues:
6
>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.

Thanks, Dragan, that is pretty neat. It doesn't give the remote name to current computer's C: drive, but I'll just recreate the C$ share :)

What I'm trying to do is backup databases with our backup batch files. Those files currently zip and copy a number of directories from several machines into the indicated directory. So the VFP program will receive database particulars and a target directory, both of which may be in different machines, and make a copy to target directory.

Alex
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform