Home All Groups Group Topic Archive Search About
Author
15 Apr 2005 12:11 PM
Husam
Hi EveryBody:

How can I check if the file created by me exists or not?

any help will be appreciated

regard's

Husam

Author
15 Apr 2005 12:24 PM
Jason Newell
Husam,
    System.IO.File.Exists()

Jason Newell, MCAD
Software Engineer

Husam wrote:
Show quoteHide quote
> Hi EveryBody:
>
> How can I check if the file created by me exists or not?
>
> any help will be appreciated
>
> regard's
>
> Husam
Author
15 Apr 2005 3:16 PM
Husam
Hi EveryBody:

I just really want to thank all of you for your quik and helpfull replayment

regard's

Husam

Show quoteHide quote
"Jason Newell" wrote:

> Husam,
>     System.IO.File.Exists()
>
> Jason Newell, MCAD
> Software Engineer
>
> Husam wrote:
> > Hi EveryBody:
> >
> > How can I check if the file created by me exists or not?
> >
> > any help will be appreciated
> >
> > regard's
> >
> > Husam
>
Author
15 Apr 2005 12:29 PM
Herfried K. Wagner [MVP]
"Husam" <Hu***@discussions.microsoft.com> schrieb:
> How can I check if the file created by me exists or not?

'System.IO.File.Exists'.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
15 Apr 2005 1:12 PM
rawCoder
System.IO.File.Exists

http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemiofileclassexiststopic.asp

HTH
rawCoder


Show quoteHide quote
"Husam" <Hu***@discussions.microsoft.com> wrote in message
news:6FD6BDA2-76CF-4D62-AB37-7A070B5775CF@microsoft.com...
> Hi EveryBody:
>
> How can I check if the file created by me exists or not?
>
> any help will be appreciated
>
> regard's
>
> Husam
Author
15 Apr 2005 2:05 PM
Chris Murphy via DotNetMonster.com
Select Case File.Exists(MyFileName)
Case True
    'if the file does not exist, then creating (or whatever)
Case False
    'if it DOES exist, do nothing.. (or whatever)
End Select

--
Message posted via http://www.dotnetmonster.com
Author
15 Apr 2005 2:55 PM
Phill. W
"Chris Murphy via DotNetMonster.com" <fo***@DotNetMonster.com> wrote in
message news:78b35f7bf7aa48f2b238a1117824c452@DotNetMonster.com...
> Select Case File.Exists(MyFileName)
> Case True
>     'if the file does not exist, then creating (or whatever)
> Case False
>     'if it DOES exist, do nothing.. (or whatever)
> End Select

Why would you choose to use "Select Case" when File.Exists()
returns a Boolean?

Regards,
    Phill  W.
Author
15 Apr 2005 3:30 PM
Herfried K. Wagner [MVP]
"Chris Murphy via DotNetMonster.com" <fo***@DotNetMonster.com> schrieb:
> Select Case File.Exists(MyFileName)
> Case True
>    'if the file does not exist, then creating (or whatever)
> Case False
>    'if it DOES exist, do nothing.. (or whatever)
> End Select

I prefer 'If...Then':

\\\
If File.Exists(...) Then
    ...
Else
    ...
End If
///

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>