The following example checks if a disk is inserted in drive A:

if not validdrive( "a:" )

   // No disk (or no floppy drive installed) 

endif

The following example use a UNC name to check if the user is connected to a particular network drive:

if not validdrive( "\\finance\vol2" )

   // Not connected to Finance server, or has no access to Vol2 volume 

endif