Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Checking for Folder existence using FILE()
Message
De
17/09/2001 11:46:18
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
17/09/2001 11:40:34
Mark Brittell
NYS Department of Taxation and Finance
Schenectady, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00557314
Message ID:
00557320
Vues:
7
>Windows 2000 is being installed onto laptops in our office and we have not had an opportunity to convert all out applications to VFP. We have used the FILE() function to determine the existence of a folder using the NUL device reference. This is not working on the Win2000 laptops. We are aware that ADIR() will work but would like to find a way to have the FILE() function work without having to change and recompile our applications. Any advice would be appreciated.
>
>Thanks
>
>Mark Brittell
>NYS Department of Taxation and Finance

Probably you can try some action on the - maybe existing - folder, and trap for errors. Something like this:
lcError = on("error")
MyError = .F.
on error MyError = .T.
copy file TestFile to MyFolder\TestFile
on error &lcError
if MyError
Perhaps you need some other action, instead of copying a file. Some experimenting may be needed.

HTH, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform