PC Review


Reply
Thread Tools Rate Thread

Determining A Valid Directory

 
 
Ross
Guest
Posts: n/a
 
      2nd Feb 2004
How can I determine that a directory exists, it is
valid.

For example: Is "C:\imports\" a valid directory?

Thanks


 
Reply With Quote
 
 
 
 
Cheryl Fischer
Guest
Posts: n/a
 
      2nd Feb 2004
Ross,

Here is one way to do it:

If Len(Trim(Dir("c:\imports", vbDirectory))) > 0 Then
MsgBox "folder exists"
End If


hth,
--

Cheryl Fischer, MVP Microsoft Access
Law/Sys Associates, Houston, TX


"Ross" <(E-Mail Removed)> wrote in message
news:8cb601c3e9b0$eadb1c90$(E-Mail Removed)...
> How can I determine that a directory exists, it is
> valid.
>
> For example: Is "C:\imports\" a valid directory?
>
> Thanks
>
>



 
Reply With Quote
 
TC
Guest
Posts: n/a
 
      3rd Feb 2004
But whack an On Error around it, just in case the path contains an invalid
drive letter (for example).

TC


"Cheryl Fischer" <(E-Mail Removed)> wrote in message
news:unQ$(E-Mail Removed)...
> Ross,
>
> Here is one way to do it:
>
> If Len(Trim(Dir("c:\imports", vbDirectory))) > 0 Then
> MsgBox "folder exists"
> End If
>
>
> hth,
> --
>
> Cheryl Fischer, MVP Microsoft Access
> Law/Sys Associates, Houston, TX
>
>
> "Ross" <(E-Mail Removed)> wrote in message
> news:8cb601c3e9b0$eadb1c90$(E-Mail Removed)...
> > How can I determine that a directory exists, it is
> > valid.
> >
> > For example: Is "C:\imports\" a valid directory?
> >
> > Thanks
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Determining if a directory is writeable Marco Shaw Microsoft Dot NET 1 23rd Nov 2006 06:35 PM
Directory Field for searching for valid directory =?Utf-8?B?cm1jb21wdXRl?= Microsoft Access Forms 1 22nd Jul 2006 03:26 PM
Determining the Password Age from Active Directory Andy M Microsoft Dot NET Framework 0 7th Oct 2004 11:16 AM
Urgent! Problem debugging application - error: Directory is not a valid working directory. VM Microsoft VC .NET 1 9th Feb 2004 06:01 PM
Determining if a path is a directory or a file Jeremy Chapman Microsoft Dot NET Framework 1 7th Nov 2003 01:05 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:00 AM.