Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
File locations
Message
 
À
05/10/2001 18:21:44
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00565023
Message ID:
00565145
Vues:
28
Just a quick 'Beware' on App.path and root directories, if you use app.path for prefixing, be sure to be aware that app.path returns the backslash '\' if it is operating from the root of the drive, for instance a CD-ROM or C:\, and does not return it if it is operating from a directory. What is even worse is that some OS version ignore the double backslash, and yet it chokes on others.


The best way is a function that returns the path and always verifies that a backslash is
>>What is the best way to code a program for accessing files. For instance...if you hard code into the program to open a file "open c:\example\abc.txt", and the user did a default install, everything is fine. But if the user decides to change the default install directory, the file is not there.
>>
>>Help.
>
>Always use App.Path in front of the file name to get to the application's directory. If the files are located within another subdirectory, use App.Path & "\myFolder\abc.txt".
>HTH
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform