473,396 Members | 1,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

test for existence of file

How do I test for existence of a file in the file system:

If FileExists(myVariable & ".pdf") = True
pnlMyPanel.Visible = True
End If

--
_____
DC G
Nov 18 '05 #1
13 1855
Use the File.Exists method.

"DC Gringo" <dc******@visiontechnology.net> wrote in message
news:e4**************@TK2MSFTNGP10.phx.gbl...
How do I test for existence of a file in the file system:

If FileExists(myVariable & ".pdf") = True
pnlMyPanel.Visible = True
End If

--
_____
DC G

Nov 18 '05 #2
You should use a System.IO.FileInfo object.

The C# code for doing what you want is like this:

FileInfo myFile = new FileInfo(myVariable + ".pdf")
if(myFile.Exists)
{
pnlMyPanel.Visible = true;
}

--
mvh
Svein Terje Gaup

"DC Gringo" <dc******@visiontechnology.net> wrote in message
news:e4**************@TK2MSFTNGP10.phx.gbl...
How do I test for existence of a file in the file system:

If FileExists(myVariable & ".pdf") = True
pnlMyPanel.Visible = True
End If

--
_____
DC G

Nov 18 '05 #3
Dim myFile As FileInfo = New FileInfo(myFileName)
If(myFile.Exists)
myPanel.Visible = True
End If

Sincerely
Svein Terje Gaup

"DC Gringo" <dc******@visiontechnology.net> wrote in message
news:e4**************@TK2MSFTNGP10.phx.gbl...
How do I test for existence of a file in the file system:

If FileExists(myVariable & ".pdf") = True
pnlMyPanel.Visible = True
End If

--
_____
DC G

Nov 18 '05 #4
....or just use the File class of the System.IO namespace:
If (System.IO.File.Exists(myFile)) Then
myPanel.Visible = True
End If

--
Hope this helps ...

Rene Mansveld
Spider IT - Germany (was Whitworth Software Solutions)
www.Spider-IT.de / www.Spider-IT.net / www.Spider-IT.org / www.Spider-IT.biz

Please reply to the newsgroup(s) :o)

"Svein Terje Gaup" <st****@broadpark.no.spam> schrieb im Newsbeitrag
news:OG**************@TK2MSFTNGP09.phx.gbl...
Dim myFile As FileInfo = New FileInfo(myFileName)
If(myFile.Exists)
myPanel.Visible = True
End If

Sincerely
Svein Terje Gaup

"DC Gringo" <dc******@visiontechnology.net> wrote in message
news:e4**************@TK2MSFTNGP10.phx.gbl...
How do I test for existence of a file in the file system:

If FileExists(myVariable & ".pdf") = True
pnlMyPanel.Visible = True
End If

--
_____
DC G


Nov 18 '05 #5
Ok, I'm trying this but is not working. I'm using a path to and from a
webserver location...should that make a difference?

If (System.IO.File.Exists("../folder/anotherfolder/" & aVariable&
"/adocument.pdf")) Then

pnlIntro.Visible = True

End If

_____

DC G

"Rene Mansveld" <R.********@TAKETHISOUT.Spider-IT.de> wrote in message
news:eF**************@TK2MSFTNGP10.phx.gbl...
...or just use the File class of the System.IO namespace:
If (System.IO.File.Exists(myFile)) Then
myPanel.Visible = True
End If

--
Hope this helps ...

Rene Mansveld
Spider IT - Germany (was Whitworth Software Solutions)
www.Spider-IT.de / www.Spider-IT.net / www.Spider-IT.org / www.Spider-IT.biz
Please reply to the newsgroup(s) :o)

"Svein Terje Gaup" <st****@broadpark.no.spam> schrieb im Newsbeitrag
news:OG**************@TK2MSFTNGP09.phx.gbl...
Dim myFile As FileInfo = New FileInfo(myFileName)
If(myFile.Exists)
myPanel.Visible = True
End If

Sincerely
Svein Terje Gaup

"DC Gringo" <dc******@visiontechnology.net> wrote in message
news:e4**************@TK2MSFTNGP10.phx.gbl...
How do I test for existence of a file in the file system:

If FileExists(myVariable & ".pdf") = True
pnlMyPanel.Visible = True
End If

--
_____
DC G



Nov 18 '05 #6
I think you are going to need an absolute path there.. even if you derive it
from your current assembly - I don't think it assumes a "current working
directory".
"DC Gringo" <dc******@visiontechnology.net> wrote in message
news:Og**************@TK2MSFTNGP09.phx.gbl...
Ok, I'm trying this but is not working. I'm using a path to and from a
webserver location...should that make a difference?

If (System.IO.File.Exists("../folder/anotherfolder/" & aVariable&
"/adocument.pdf")) Then

pnlIntro.Visible = True

End If

_____

DC G

"Rene Mansveld" <R.********@TAKETHISOUT.Spider-IT.de> wrote in message
news:eF**************@TK2MSFTNGP10.phx.gbl...
...or just use the File class of the System.IO namespace:
If (System.IO.File.Exists(myFile)) Then
myPanel.Visible = True
End If

--
Hope this helps ...

Rene Mansveld
Spider IT - Germany (was Whitworth Software Solutions)
www.Spider-IT.de / www.Spider-IT.net / www.Spider-IT.org /

www.Spider-IT.biz

Please reply to the newsgroup(s) :o)

"Svein Terje Gaup" <st****@broadpark.no.spam> schrieb im Newsbeitrag
news:OG**************@TK2MSFTNGP09.phx.gbl...
Dim myFile As FileInfo = New FileInfo(myFileName)
If(myFile.Exists)
myPanel.Visible = True
End If

Sincerely
Svein Terje Gaup

"DC Gringo" <dc******@visiontechnology.net> wrote in message
news:e4**************@TK2MSFTNGP10.phx.gbl...
> How do I test for existence of a file in the file system:
>
> If FileExists(myVariable & ".pdf") = True
> pnlMyPanel.Visible = True
> End If
>
> --
> _____
> DC G
>
>



Nov 18 '05 #7
Don't ever mix up file IO and web server. They are not, never have been, and
never will be, the same. Well, maybe "never will be" is a bit overconfident.
System.IO is a namespace for working with file system objects, NOT web
server objects. That means that the file system will never (again, I may be
a bit too bold to say "never") be able to understand a URL. You are in luck
in one sense, however. The ASP.Net HTTPServerUtility has a method which can
translate a URL into a file location: MapPath(). Use Server.MapPath(url) to
convert the URL to a file location, then check if it exists with the correct
path.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"DC Gringo" <dc******@visiontechnology.net> wrote in message
news:Og**************@TK2MSFTNGP09.phx.gbl...
Ok, I'm trying this but is not working. I'm using a path to and from a
webserver location...should that make a difference?

If (System.IO.File.Exists("../folder/anotherfolder/" & aVariable&
"/adocument.pdf")) Then

pnlIntro.Visible = True

End If

_____

DC G

"Rene Mansveld" <R.********@TAKETHISOUT.Spider-IT.de> wrote in message
news:eF**************@TK2MSFTNGP10.phx.gbl...
...or just use the File class of the System.IO namespace:
If (System.IO.File.Exists(myFile)) Then
myPanel.Visible = True
End If

--
Hope this helps ...

Rene Mansveld
Spider IT - Germany (was Whitworth Software Solutions)
www.Spider-IT.de / www.Spider-IT.net / www.Spider-IT.org /

www.Spider-IT.biz

Please reply to the newsgroup(s) :o)

"Svein Terje Gaup" <st****@broadpark.no.spam> schrieb im Newsbeitrag
news:OG**************@TK2MSFTNGP09.phx.gbl...
Dim myFile As FileInfo = New FileInfo(myFileName)
If(myFile.Exists)
myPanel.Visible = True
End If

Sincerely
Svein Terje Gaup

"DC Gringo" <dc******@visiontechnology.net> wrote in message
news:e4**************@TK2MSFTNGP10.phx.gbl...
> How do I test for existence of a file in the file system:
>
> If FileExists(myVariable & ".pdf") = True
> pnlMyPanel.Visible = True
> End If
>
> --
> _____
> DC G
>
>



Nov 18 '05 #8
Hello DC,

Since you're in a web application, try this:

string file = Server.MapPath("../folder/anotherfolder/" + aVariable + "/adocument.pdf");
if (File.Exists(file))
{
pnlIntro.Visible=true;
}

--
Matt Berther
http://www.mattberther.com
Ok, I'm trying this but is not working. I'm using a path to and from
a webserver location...should that make a difference?

If (System.IO.File.Exists("../folder/anotherfolder/" & aVariable&
"/adocument.pdf")) Then

pnlIntro.Visible = True

End If

_____

DC G

"Rene Mansveld" <R.********@TAKETHISOUT.Spider-IT.de> wrote in message
news:eF**************@TK2MSFTNGP10.phx.gbl...
...or just use the File class of the System.IO namespace:
If (System.IO.File.Exists(myFile)) Then
myPanel.Visible = True
End If
--
Hope this helps ...
Rene Mansveld
Spider IT - Germany (was Whitworth Software Solutions)
www.Spider-IT.de / www.Spider-IT.net / www.Spider-IT.org /

www.Spider-IT.biz
Please reply to the newsgroup(s) :o)

"Svein Terje Gaup" <st****@broadpark.no.spam> schrieb im Newsbeitrag
news:OG**************@TK2MSFTNGP09.phx.gbl...
Dim myFile As FileInfo = New FileInfo(myFileName)
If(myFile.Exists)
myPanel.Visible = True
End If
Sincerely
Svein Terje Gaup
"DC Gringo" <dc******@visiontechnology.net> wrote in message
news:e4**************@TK2MSFTNGP10.phx.gbl...

How do I test for existence of a file in the file system:

If FileExists(myVariable & ".pdf") = True
pnlMyPanel.Visible = True
End If
--
_____
DC G


Nov 18 '05 #9
Still no beans...here's my code...

Dim theFile As String

theFile = Server.MapPath("/livelihoods/files/" & countryCode & "/intro.pdf")

If System.IO.File.Exists(theFile) = True Then

pnlIntro.Visible = True

End If

"Matt Berther" <mb******@hotmail.com> wrote in message
news:eH**************@TK2MSFTNGP10.phx.gbl...
Hello DC,

Since you're in a web application, try this:

string file = Server.MapPath("../folder/anotherfolder/" + aVariable + "/adocument.pdf"); if (File.Exists(file))
{
pnlIntro.Visible=true;
}

--
Matt Berther
http://www.mattberther.com
Ok, I'm trying this but is not working. I'm using a path to and from
a webserver location...should that make a difference?

If (System.IO.File.Exists("../folder/anotherfolder/" & aVariable&
"/adocument.pdf")) Then

pnlIntro.Visible = True

End If

_____

DC G

"Rene Mansveld" <R.********@TAKETHISOUT.Spider-IT.de> wrote in message
news:eF**************@TK2MSFTNGP10.phx.gbl...
...or just use the File class of the System.IO namespace:
If (System.IO.File.Exists(myFile)) Then
myPanel.Visible = True
End If
--
Hope this helps ...
Rene Mansveld
Spider IT - Germany (was Whitworth Software Solutions)
www.Spider-IT.de / www.Spider-IT.net / www.Spider-IT.org /

www.Spider-IT.biz
Please reply to the newsgroup(s) :o)

"Svein Terje Gaup" <st****@broadpark.no.spam> schrieb im Newsbeitrag
news:OG**************@TK2MSFTNGP09.phx.gbl...

Dim myFile As FileInfo = New FileInfo(myFileName)
If(myFile.Exists)
myPanel.Visible = True
End If
Sincerely
Svein Terje Gaup
"DC Gringo" <dc******@visiontechnology.net> wrote in message
news:e4**************@TK2MSFTNGP10.phx.gbl...

> How do I test for existence of a file in the file system:
>
> If FileExists(myVariable & ".pdf") = True
> pnlMyPanel.Visible = True
> End If
> --
> _____
> DC G

Nov 18 '05 #10
Hello DC,

theFile = Server.MapPath("~/livelihoods/files/" & countryCode & "/intro.pdf")

Notice the ~...

The ~ is an alias for the current virtual root. Otherwise you'd be looking in the web applications root folder (ie: c:\inetpub\wwwroot\livelihoods)

--
Matt Berther
http://www.mattberther.com
Still no beans...here's my code...

Dim theFile As String

theFile = Server.MapPath("/livelihoods/files/" & countryCode &
"/intro.pdf")

If System.IO.File.Exists(theFile) = True Then

pnlIntro.Visible = True

End If

"Matt Berther" <mb******@hotmail.com> wrote in message
news:eH**************@TK2MSFTNGP10.phx.gbl...
Hello DC,

Since you're in a web application, try this:

string file = Server.MapPath("../folder/anotherfolder/" + aVariable +

"/adocument.pdf");
if (File.Exists(file))
{
pnlIntro.Visible=true;
}
--
Matt Berther
http://www.mattberther.com
Ok, I'm trying this but is not working. I'm using a path to and
from a webserver location...should that make a difference?

If (System.IO.File.Exists("../folder/anotherfolder/" & aVariable&
"/adocument.pdf")) Then

pnlIntro.Visible = True

End If

_____

DC G

"Rene Mansveld" <R.********@TAKETHISOUT.Spider-IT.de> wrote in
message news:eF**************@TK2MSFTNGP10.phx.gbl...

...or just use the File class of the System.IO namespace:
If (System.IO.File.Exists(myFile)) Then
myPanel.Visible = True
End If
--
Hope this helps ...
Rene Mansveld
Spider IT - Germany (was Whitworth Software Solutions)
www.Spider-IT.de / www.Spider-IT.net / www.Spider-IT.org /
www.Spider-IT.biz

Please reply to the newsgroup(s) :o)

"Svein Terje Gaup" <st****@broadpark.no.spam> schrieb im
Newsbeitrag news:OG**************@TK2MSFTNGP09.phx.gbl...

> Dim myFile As FileInfo = New FileInfo(myFileName)
> If(myFile.Exists)
> myPanel.Visible = True
> End If
> Sincerely
> Svein Terje Gaup
> "DC Gringo" <dc******@visiontechnology.net> wrote in message
> news:e4**************@TK2MSFTNGP10.phx.gbl...
>> How do I test for existence of a file in the file system:
>>
>> If FileExists(myVariable & ".pdf") = True
>> pnlMyPanel.Visible = True
>> End If
>> --
>> _____
>> DC G


Nov 18 '05 #11
Really getting frustrated here. I've got the MapPath working and spewing
out the right path...I am able to print it out on the page with <% =
theFileMapped %>. It's just not catching on my conditional statement in the
code behind and making my panel visible. I can turn the panel on and off
manually in the <asp:label visible=> attribute, but it just doesn't work in
my code behind.

In my page:
--------------------
<ASP:PANEL ID="pnlIntro" VISIBLE="False" RUNAT="server"><SPAN
STYLE="FONT-SIZE: 10px">. </SPAN>
<A CLASS="secondNav"
HREF="/livelihoods/<% = countryCode %>/intro.pdf"
TARGET="_blank">Zoning/Profiling Intro</A><BR>
</ASP:PANEL>
In my code-behind
----------------------------
Public theFile As String
Public theFileMapped As String

Protected WithEvents pnlIntro As System.Web.UI.WebControls.Panel

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

theFile = "~/livelihoods/files/" & countryCode & "/intro.pdf"
theFileMapped = Server.MapPath(theFile)

If System.IO.File.Exists(theFileMapped) Then
pnlIntro.Visible = True
End If

End Sub
_____
DC G

"Matt Berther" <mb******@hotmail.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hello DC,

theFile = Server.MapPath("~/livelihoods/files/" & countryCode & "/intro.pdf")
Notice the ~...

The ~ is an alias for the current virtual root. Otherwise you'd be looking in the web applications root folder (ie: c:\inetpub\wwwroot\livelihoods)
--
Matt Berther
http://www.mattberther.com
Still no beans...here's my code...

Dim theFile As String

theFile = Server.MapPath("/livelihoods/files/" & countryCode &
"/intro.pdf")

If System.IO.File.Exists(theFile) = True Then

pnlIntro.Visible = True

End If

"Matt Berther" <mb******@hotmail.com> wrote in message
news:eH**************@TK2MSFTNGP10.phx.gbl...
Hello DC,

Since you're in a web application, try this:

string file = Server.MapPath("../folder/anotherfolder/" + aVariable +

"/adocument.pdf");
if (File.Exists(file))
{
pnlIntro.Visible=true;
}
--
Matt Berther
http://www.mattberther.com
Ok, I'm trying this but is not working. I'm using a path to and
from a webserver location...should that make a difference?

If (System.IO.File.Exists("../folder/anotherfolder/" & aVariable&
"/adocument.pdf")) Then

pnlIntro.Visible = True

End If

_____

DC G

"Rene Mansveld" <R.********@TAKETHISOUT.Spider-IT.de> wrote in
message news:eF**************@TK2MSFTNGP10.phx.gbl...

> ...or just use the File class of the System.IO namespace:
> If (System.IO.File.Exists(myFile)) Then
> myPanel.Visible = True
> End If
> --
> Hope this helps ...
> Rene Mansveld
> Spider IT - Germany (was Whitworth Software Solutions)
> www.Spider-IT.de / www.Spider-IT.net / www.Spider-IT.org /
www.Spider-IT.biz

> Please reply to the newsgroup(s) :o)
>
> "Svein Terje Gaup" <st****@broadpark.no.spam> schrieb im
> Newsbeitrag news:OG**************@TK2MSFTNGP09.phx.gbl...
>
>> Dim myFile As FileInfo = New FileInfo(myFileName)
>> If(myFile.Exists)
>> myPanel.Visible = True
>> End If
>> Sincerely
>> Svein Terje Gaup
>> "DC Gringo" <dc******@visiontechnology.net> wrote in message
>> news:e4**************@TK2MSFTNGP10.phx.gbl...
>>> How do I test for existence of a file in the file system:
>>>
>>> If FileExists(myVariable & ".pdf") = True
>>> pnlMyPanel.Visible = True
>>> End If
>>> --
>>> _____
>>> DC G

Nov 18 '05 #12
DC Gringo,

From the start of the thread I got the idea that you want to use code on the
client side, you cannot.

You can use this code on the serverside either with a webapplication or with
a webservice application. However than should the application have proper
rights to the path's you are using.

I hope this helps?

Cor

"DC Gringo"
Ok, I'm trying this but is not working. I'm using a path to and from a
webserver location...should that make a difference?

If (System.IO.File.Exists("../folder/anotherfolder/" & aVariable&
"/adocument.pdf")) Then

pnlIntro.Visible = True

End If

_____

DC G

"Rene Mansveld" <R.********@TAKETHISOUT.Spider-IT.de> wrote in message
news:eF**************@TK2MSFTNGP10.phx.gbl...
...or just use the File class of the System.IO namespace:
If (System.IO.File.Exists(myFile)) Then
myPanel.Visible = True
End If

--
Hope this helps ...

Rene Mansveld
Spider IT - Germany (was Whitworth Software Solutions)
www.Spider-IT.de / www.Spider-IT.net / www.Spider-IT.org /

www.Spider-IT.biz

Please reply to the newsgroup(s) :o)

"Svein Terje Gaup" <st****@broadpark.no.spam> schrieb im Newsbeitrag
news:OG**************@TK2MSFTNGP09.phx.gbl...
Dim myFile As FileInfo = New FileInfo(myFileName)
If(myFile.Exists)
myPanel.Visible = True
End If

Sincerely
Svein Terje Gaup

"DC Gringo" <dc******@visiontechnology.net> wrote in message
news:e4**************@TK2MSFTNGP10.phx.gbl...
> How do I test for existence of a file in the file system:
>
> If FileExists(myVariable & ".pdf") = True
> pnlMyPanel.Visible = True
> End If
>
> --
> _____
> DC G
>
>



Nov 18 '05 #13
Hmm.. not sure about that.. (I don't mean that in a sarcastic way, I mean I
really don't know if that's possible) - but what I would use is a
LinkButton - which looks like a regular link, then in your code-behind,
dynamically generate the NavigateUrl property..

"DC Gringo" <dc******@visiontechnology.net> wrote in message
news:OH**************@TK2MSFTNGP11.phx.gbl...
Really getting frustrated here. I've got the MapPath working and spewing
out the right path...I am able to print it out on the page with <% =
theFileMapped %>. It's just not catching on my conditional statement in the code behind and making my panel visible. I can turn the panel on and off
manually in the <asp:label visible=> attribute, but it just doesn't work in my code behind.

In my page:
--------------------
<ASP:PANEL ID="pnlIntro" VISIBLE="False" RUNAT="server"><SPAN
STYLE="FONT-SIZE: 10px">. </SPAN>
<A CLASS="secondNav"
HREF="/livelihoods/<% = countryCode %>/intro.pdf"
TARGET="_blank">Zoning/Profiling Intro</A><BR>
</ASP:PANEL>
In my code-behind
----------------------------
Public theFile As String
Public theFileMapped As String

Protected WithEvents pnlIntro As System.Web.UI.WebControls.Panel

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

theFile = "~/livelihoods/files/" & countryCode & "/intro.pdf"
theFileMapped = Server.MapPath(theFile)

If System.IO.File.Exists(theFileMapped) Then
pnlIntro.Visible = True
End If

End Sub
_____
DC G

"Matt Berther" <mb******@hotmail.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hello DC,

theFile = Server.MapPath("~/livelihoods/files/" & countryCode & "/intro.pdf")

Notice the ~...

The ~ is an alias for the current virtual root. Otherwise you'd be

looking in the web applications root folder (ie: c:\inetpub\wwwroot\livelihoods)

--
Matt Berther
http://www.mattberther.com
Still no beans...here's my code...

Dim theFile As String

theFile = Server.MapPath("/livelihoods/files/" & countryCode &
"/intro.pdf")

If System.IO.File.Exists(theFile) = True Then

pnlIntro.Visible = True

End If

"Matt Berther" <mb******@hotmail.com> wrote in message
news:eH**************@TK2MSFTNGP10.phx.gbl...

> Hello DC,
>
> Since you're in a web application, try this:
>
> string file = Server.MapPath("../folder/anotherfolder/" + aVariable +
>
"/adocument.pdf");

> if (File.Exists(file))
> {
> pnlIntro.Visible=true;
> }
> --
> Matt Berther
> http://www.mattberther.com
>> Ok, I'm trying this but is not working. I'm using a path to and
>> from a webserver location...should that make a difference?
>>
>> If (System.IO.File.Exists("../folder/anotherfolder/" & aVariable&
>> "/adocument.pdf")) Then
>>
>> pnlIntro.Visible = True
>>
>> End If
>>
>> _____
>>
>> DC G
>>
>> "Rene Mansveld" <R.********@TAKETHISOUT.Spider-IT.de> wrote in
>> message news:eF**************@TK2MSFTNGP10.phx.gbl...
>>
>>> ...or just use the File class of the System.IO namespace:
>>> If (System.IO.File.Exists(myFile)) Then
>>> myPanel.Visible = True
>>> End If
>>> --
>>> Hope this helps ...
>>> Rene Mansveld
>>> Spider IT - Germany (was Whitworth Software Solutions)
>>> www.Spider-IT.de / www.Spider-IT.net / www.Spider-IT.org /
>> www.Spider-IT.biz
>>
>>> Please reply to the newsgroup(s) :o)
>>>
>>> "Svein Terje Gaup" <st****@broadpark.no.spam> schrieb im
>>> Newsbeitrag news:OG**************@TK2MSFTNGP09.phx.gbl...
>>>
>>>> Dim myFile As FileInfo = New FileInfo(myFileName)
>>>> If(myFile.Exists)
>>>> myPanel.Visible = True
>>>> End If
>>>> Sincerely
>>>> Svein Terje Gaup
>>>> "DC Gringo" <dc******@visiontechnology.net> wrote in message
>>>> news:e4**************@TK2MSFTNGP10.phx.gbl...
>>>>> How do I test for existence of a file in the file system:
>>>>>
>>>>> If FileExists(myVariable & ".pdf") = True
>>>>> pnlMyPanel.Visible = True
>>>>> End If
>>>>> --
>>>>> _____
>>>>> DC G


Nov 18 '05 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Thierry S. | last post by:
Hello. I would to test the existence of a variable before to use it (like isset($myVar) in PHP). I try using "if myVar: ", but there is the error meesage (naturally): "NameError: name 'myVar'...
7
by: Pietro | last post by:
Hi at all, I am looking for a mean to test if a function work with a certain Browser or not. I'ld like to make a funcrion that return true if the browse is compatible with a certain funcrion or...
14
by: Matt | last post by:
Hello, I see other references in this newsgroup saying that the only standard C++ way to test for file existence is some variant of my code below; can someone please confirm...or offer...
12
by: DC Gringo | last post by:
How do I test for existence of a file in the file system: If FileExists(myVariable & ".pdf") = True pnlMyPanel.Visible = True End If -- _____ DC G
6
by: Vmusic | last post by:
Hi, I am using Javascript to add rows to tables, etc. in a function I am calling. I pass the function the ID of the div, and what I want in the rows, and it will add rows to a table in the div. ...
9
by: wildernesscat | last post by:
Hello there, I'm looking for a method to test, whether an object has a certain property. Consider the following snippet: class A { var $aaa; } $var = new A; (Assuming that the structure...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.