Tesiting for file existance

dashley

Well-known member
Joined
May 27, 2005
Messages
59
Location
Tennessee
Programming Experience
10+
Tesiting for file existance RESOLVED

Im trying to determine if a file exists (on a Win Mobile device) via an ASP page over a wireless environent. If the file isnt there I want to write it. I'm using a .txt file as a test file but will ultimatly be writting an XML file to the device.
I've tried the code below which runs but cant find and wont write the needed file.

Any Ideas?

Thanks

Dan


VB.NET:
Dim oFilesys Set oFilesys = Server.CreateObject("Scripting.FileSystemObject") 
 
If NOT oFilesys.FileExists("\Program Files\newfile.txt") Then 
 
oFilesys.CreateTextFile("\Program Files\newfile.txt") 
 
Response.Write "DONE" 
 
else 
 
Response.Write "File Creation Failed" 
 
end if 
 
Set oFilesys = nothing
 
Last edited:
Back
Top