Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error in drive detection
Message
 
To
16/03/2001 01:39:17
Stephanie Caragos
Ebs Accounting Software Solutions
Cagayan de Oro City, Philippines
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00485735
Message ID:
00485820
Views:
8
>I tried detecting a drive at that valid even of my textbox and this was my command...
>
>IF ! empty(this.value)
> dirdrive=alltrim(this.value)
> oFSO = CREATEOBJECT("Scripting.FileSystemObject")
> STORE oFSO.FolderExists("&dirdrive:\") to hon
> IF hon=.f.
> ans=messagebox('This is not a valid drive or there is no disk ;
> in the drive, please try again')
> this.value=''
> RETURN 0
> ENDIF
>ENDIF
>
>however, when i tried compiling it and running it in a windows 95 environment, the createobject triggered an error. is there a way of solving this problem or is there another way of detecting a drive aside from this? by the way, i'm using visual foxpro 6 in developing the system.
>
stephanie,

As all mentioned, check the series at the VFUG site for more information. FWIW, I'm not completely sure what the "&dirdrive:\" is supposed to be. There are methods for checking if a drive exists (DriveExists), a property to tell if a removable drive has a disk in it (the IsReady property of the Drive object). These should give you a start.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform