Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: FileSystemObject - Accesing, reading and deleting files on server


Message #1 by "Jeff Gaudet" <gaudet54@h...> on Wed, 29 Nov 2000 14:29:05 -0000
my scenario is that I have a website that uses the FSO to process

form/user requests. When the user finishes inputing his data into the form

he hits the check availibity button. I have his form data inputed into a

text file that is unique to him as I have assigned a random number along

with a .100 extension(ie:561411.100). We have a program written in C that

takes the user data and processes it, and returns a file with the same

random number as the .100 except it has a .200 extension. From there I

break the file down and use the data in variables that I use in my page,

displayed to the user. My question is twofold, first is there any way to

set it up so that when the users data is processed we delete the .100 and

.200 file? The second half of my question is whether there is a

better/easier/more effecient way to handle this type of situation.





Here is the code to get and breakdown the .200 file

getfile1 = "..\..\..\..\..\nfl\internet\" & random1 & ".200"



Set getfile2 = Server.CreateObject("Scripting.FileSystemObject")



getfile3 = Server.MapPath(getfile1)



Set InStream = getfile2.OpenTextFile(getfile3, 1, False, False)



Tline = Instream.ReadLine

ferry1 = Tline



Tline = Instream.ReadLine

date1 = Tline



Tline = Instream.ReadLine

adult1 = Tline

Message #2 by Robert Chartier <rchartierh@a...> on Wed, 29 Nov 2000 09:54:11 -0500
do you have the source for the C program?  how hard would it be to rewrite 

the logic, or copy & past the logic into a C++ COM object?  That way, the 

file handling can be avoided completely.  You will just have to communicate 

synchronously with the object for the results.









At 09:29 AM 11/29/00, you wrote:

>my scenario is that I have a website that uses the FSO to process

>form/user requests. When the user finishes inputing his data into the form

>he hits the check availibity button. I have his form data inputed into a

>text file that is unique to him as I have assigned a random number along

>with a .100 extension(ie:561411.100). We have a program written in C that

>takes the user data and processes it, and returns a file with the same

>random number as the .100 except it has a .200 extension. From there I

>break the file down and use the data in variables that I use in my page,

>displayed to the user. My question is twofold, first is there any way to

>set it up so that when the users data is processed we delete the .100 and

>.200 file? The second half of my question is whether there is a

>better/easier/more effecient way to handle this type of situation.

>

>

>Here is the code to get and breakdown the .200 file

>getfile1 = "..\..\..\..\..\nfl\internet\" & random1 & ".200"

>

>Set getfile2 = Server.CreateObject("Scripting.FileSystemObject")

>

>getfile3 = Server.MapPath(getfile1)

>

>Set InStream = getfile2.OpenTextFile(getfile3, 1, False, False)

>

>Tline = Instream.ReadLine

>ferry1 = Tline

>

>Tline = Instream.ReadLine

>date1 = Tline

>

>Tline = Instream.ReadLine

>adult1 = Tline

>

Robert Chartier

Author, AspFree.com

xxx-xxx-xxxx

rchartierh@a...

http://www.aspfree.com/devlinks

http://www.aspfree.com/authors/robert

http://www.aspalliance.com/nothingmn




  Return to Index