Ask a Question related to ASP, Design and Development.
-
David P. Jessup #1
FSO FileExists Method
I would like to know if I'm correct in the way I coded this:
Function CheckFileExists(sFileName)
If (fs.FileExists(sFileName)) Then
CheckFileExists = True
Else
CheckFileExists = False
End If
End Function
If CheckFileExists(Whichfolder & flindex & ".tif") Then
'java code to display the tif inline with the browser
else
'code stating there is no file to display
End if
I just want to make sure that (Whichfolder & flindex & ".tif") which is an
actual file path is what is being passed to the Function CheckFileExists as
sFileName
Thanks from this ASP Newbie
David P. Jessup Guest
-
Is creationComplete=method() or initialize=method() theright solution for such kind of problem or ...?
Hi everybody, I am using web service in my flex application and I want to visualize some data from collection of objects taht I receive from my Web... -
FileExists
I know you can use FileExists to check for a file on a local machine but was wondering how you can check for a file on one that is located on a... -
FileExists Function Broken?
I can't get the FileExists Function to work. Here is the code: <cfset abs_path = "W:\#log_dir#000\#log_image#"> <cfif FileExists("abs_path")> <a... -
method name exists, property value exists, calling method fails
I have a class object I am calling in another class: class Stuff { var $myObj; function Stuff($myObj) { $this->myObj = $myObj; } -
Scripting.FileSystemObject - FileExists - Permission Denided
Thank you for your reply. Now I changed the Directory Security to Anonymous ONLY with a domain user name and password. It passed "FileExists"... -
Ray at #2
Re: FSO FileExists Method
Hi David,
That should work, although you don't really have to encapsulate it in a
function like that. You can just do:
If fs.FileExists("C:\Path\file.xt") Then
'''code
Else
'''code
End If
Ray at work
"David P. Jessup" <davidATimntDASHtechDOTcom> wrote in message
news:%23TIP4tlkDHA.2456@TK2MSFTNGP09.phx.gbl...as> I would like to know if I'm correct in the way I coded this:
>
> Function CheckFileExists(sFileName)
> If (fs.FileExists(sFileName)) Then
> CheckFileExists = True
> Else
> CheckFileExists = False
> End If
> End Function
>
> If CheckFileExists(Whichfolder & flindex & ".tif") Then
> 'java code to display the tif inline with the browser
> else
> 'code stating there is no file to display
> End if
>
> I just want to make sure that (Whichfolder & flindex & ".tif") which is an
> actual file path is what is being passed to the Function CheckFileExists> sFileName
>
> Thanks from this ASP Newbie
>
>
Ray at Guest
-
Aaron Bertrand - MVP #3
Re: FSO FileExists Method
You could always check with some basic debugging:
Function CheckFileExists(sFileName)
response.write "Filename is " & sFileName
...
as> I just want to make sure that (Whichfolder & flindex & ".tif") which is an
> actual file path is what is being passed to the Function CheckFileExists> sFileName
Aaron Bertrand - MVP Guest
-
David P. Jessup #4
Re: FSO FileExists Method
Thanks Ray
"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:%23q7trylkDHA.1084@tk2msftngp13.phx.gbl...an> Hi David,
>
> That should work, although you don't really have to encapsulate it in a
> function like that. You can just do:
>
>
> If fs.FileExists("C:\Path\file.xt") Then
> '''code
> Else
> '''code
> End If
>
> Ray at work
>
> "David P. Jessup" <davidATimntDASHtechDOTcom> wrote in message
> news:%23TIP4tlkDHA.2456@TK2MSFTNGP09.phx.gbl...> > I would like to know if I'm correct in the way I coded this:
> >
> > Function CheckFileExists(sFileName)
> > If (fs.FileExists(sFileName)) Then
> > CheckFileExists = True
> > Else
> > CheckFileExists = False
> > End If
> > End Function
> >
> > If CheckFileExists(Whichfolder & flindex & ".tif") Then
> > 'java code to display the tif inline with the browser
> > else
> > 'code stating there is no file to display
> > End if
> >
> > I just want to make sure that (Whichfolder & flindex & ".tif") which is> as> > actual file path is what is being passed to the Function CheckFileExists>> > sFileName
> >
> > Thanks from this ASP Newbie
> >
> >
>
David P. Jessup Guest
-
David P. Jessup #5
Re: FSO FileExists Method
Heh,
Thanks Aaron, you proved why I use the sig: Thanks from this ASP NEWBIE =)
"Aaron Bertrand - MVP" <aaron@TRASHaspfaq.com> wrote in message
news:%23UnHX3lkDHA.2268@TK2MSFTNGP12.phx.gbl...an> You could always check with some basic debugging:
>
>
> Function CheckFileExists(sFileName)
> response.write "Filename is " & sFileName
> ...
>
>> > I just want to make sure that (Whichfolder & flindex & ".tif") which is> as> > actual file path is what is being passed to the Function CheckFileExists>> > sFileName
>
David P. Jessup Guest



Reply With Quote

