navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Saving Entered Data into Unique Text Files

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> General Web Development >> Saving Entered Data into Unique Text Files
Page: [1]
 
funkdrmr

 

Posts: 15
Joined: 9/4/2002
Status: offline

 
Saving Entered Data into Unique Text Files - 9/4/2002 3:01:12   
I am stationed onboard a submarine in the U.S. Navy. I have created an Intranet for our boat using FP2002, however I have 1 problem. To address this, please let me give some background. To send e-mail from our boat, all hands create a text file and then e-mail it to the personnel that send it off the boat. On the Intranet, my goal is to have a text box, where personnel can type their entries, but that is where the easy part for me stops. The unique problem for me is that I need the text that is submitted to be saved to a different text file EVERY time it is sent. Is there a way to have this form create a uniquely named text file and save that text each time, instead of having every person' s entry saved to the same file?
Spooky

 

Posts: 26606
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Saving Entered Data into Unique Text Files - 9/4/2002 19:16:34   
You may be able to use an asp solution such as :
http://www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=143

The FSO can write files to the server that you can retrieve later.
A " little" bit of asp knowledge may be needed :-)

These are the details of FSO :
http://www.aspfaqs.com/aspfaqs/ShowCategory.asp?CatID=4

< Message edited by Spooky -- 9/3/2002 7:18:11 PM >


_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to funkdrmr)
funkdrmr

 

Posts: 15
Joined: 9/4/2002
Status: offline

 
RE: Saving Entered Data into Unique Text Files - 9/4/2002 21:40:44   
Thanks for the response! It' s too bad that I don' t have ANY knowledge of ASP, but what a great time to learn. [:j] It' s going slow, but a question that I' ve come against is how do I associate the FSO with the Form that I' m creating with the ASP? TIA for anymore input.

(in reply to funkdrmr)
bobby

 

Posts: 11394
Joined: 8/15/1969
From: Seattle WA USA
Status: offline

 
RE: Saving Entered Data into Unique Text Files - 9/5/2002 12:17:57   
funkdrmr -

Welcome to the forums!

I think you' ll find that a little bit of reading may help answer a lot of your questions, and get you started learning ASP as well...

As Spooky suggested, the FSO will do exactly what you' re looking for. (You can also set up the intranet to automatically email those text files for you using ASP, if that' s an option)

Start out with this link to W3Schools.com - select ASP from the menu on the left and it will give you a very basic overview of ASP code.

After that, try an online search for ASP tutorials, check out the Resource Links thread in the Lounge forum, and don' t be shy about posting questions in the ASP / Database forum. That' s where I learn most of what i know about ASP!!!

Good Luck!

BTW - to answer your last question: the form is generally " posted" to a response page by using the following in your form tag:
<form method=" post" action=" response.asp" >

Then each form field (like the text box) is given a name. That name is called by the response page and fed into the File System Object which creates the new .txt file based on the value in the form field...

Have I completely confused you yet? Don' t worry, it gets easier!

< Message edited by bobby -- 9/4/2002 12:22:13 PM >


_____________________________

If con is the opposite of pro, is Congress the opposite of progress?


:)

(in reply to funkdrmr)
funkdrmr

 

Posts: 15
Joined: 9/4/2002
Status: offline

 
RE: Saving Entered Data into Unique Text Files - 9/5/2002 19:04:33   
So, does this mean I actually need 2 web pages to accomplish this? One, the .htm page with the form in it, which submits to the .asp that has the FSO code within it? I hope I' m getting on the right track here!!! :) Thanks for the informational reply!

(in reply to funkdrmr)
Doug G

 

Posts: 1189
Joined: 12/29/2001
From: SoCal
Status: offline

 
RE: Saving Entered Data into Unique Text Files - 9/5/2002 22:49:01   
quote:

So, does this mean I actually need 2 web pages to accomplish this? One, the .htm page with the form in it, which submits to the .asp that has the FSO code within it? I hope I' m getting on the right track here!!! Thanks for the informational reply!

Yes, unless you are feeling frisky and decide to use just one asp page that posts to itself!

It' s quite common with asp to put the " receiving" asp code near the top of your asp page, and the user form lower down in the page, and pass a control value via the querystring (or hidden field, or ...)

Here' s a quick skeleton that shows the basics. I didn' t actually run or test this so any typo' s must be because of a server problem or somethin [:p]

<%
If request.querystring(" mode" ) = " posted" Then
' The asp code to process the user' s form
value = doWhatever(request.form(" myinput" ) ' Call an asp function somewhere
response.redirect " someotherpage.asp" ' Go somewhere else when done processing input.
'
Else
' The form HTML begins below the asp delimiter %>
%>
<form name=" myform" method=" post" action=" samepage.asp?mode=" " posted" " " >
<input name=" myinput" blah blah>
<input type=" submit" >
</form>
<% End If ' Gotta close the if statement out %>


< Message edited by Doug G -- 9/4/2002 10:50:02 PM >


_____________________________

======
Doug G
======

(in reply to funkdrmr)
funkdrmr

 

Posts: 15
Joined: 9/4/2002
Status: offline

 
RE: Saving Entered Data into Unique Text Files - 9/6/2002 1:04:17   
OK guys. Hopefully, again, I' m taking all of this new information in correctly and doing ok. Here' s where I' m at. I have created 2 .asp pages. The first page has the form, which the user will type in, and NOW includes (thanks Doug) <form method=" POST" action=" response.asp" > So what I' ve taken from this, is I am telling the form to post to another page titled response.asp.
I then created my second page, titled response.asp. In it, I have the following lines of code:

<%
Const fsoTempFolder = 2

Dim objFSO
Set objFSO = Server.CreateObject(" Scripting.FileSystemObject" )

Dim strTempFolder, strTempFileName
strTempfolder = objFSO.GetSPecialFolder(fsoTempFolder)

strTempFileName = strTempFolder & " \" & objFSO.GetTempName()

Response.Write " The temporary folder is: " & strTempFolder
Response.Write " <br>A temp. file name: " & strTempFileName

Set objFSO = Nothing ' Clean up!
%>

The end result, is when the form submits, it seems to post to " response.asp" . When response comes up, it shows me the temp directory and random file name that it has chosen to save my file as....HOWEVER...no files exist. So.....I guess what I need to know now, is how I can get these files to generate. Also, if there is a way that I can save the file with a different extension, instead of .tmp, or if I could specify a certain directory, that would be great, but not completely necessary at this time. Thanks again for all the information. In 2 days, I' ve learned more than I' ve ever wondered about ASP!:)

(in reply to funkdrmr)
bobby

 

Posts: 11394
Joined: 8/15/1969
From: Seattle WA USA
Status: offline

 
RE: Saving Entered Data into Unique Text Files - 9/6/2002 12:18:33   
Looks like you' re half way there... you have the temp name, folder etc, now you just need to create the file...

Check out this link and see if it explains it well enough for you...

Impressive that you' re able to pick up this much in one day! :)


< Message edited by bobby -- 9/5/2002 12:19:04 PM >


_____________________________

If con is the opposite of pro, is Congress the opposite of progress?


:)

(in reply to funkdrmr)
funkdrmr

 

Posts: 15
Joined: 9/4/2002
Status: offline

 
RE: Saving Entered Data into Unique Text Files - 9/6/2002 18:26:48   
Ok....I' m happy to state that I have succeeded in creating the file on my server through the ASP pages!!! :) However....no text was saved into it. Also, I had to specify the file name, instead of using the generated random name. If you could take a look at what I' ve got, any more suggestions would still be greatly appreciated. I can' t thank you guys enough for all the information. Below is the code:
<%
Const fsoTempFolder = 2

Dim objFSO, objTS
Set objFSO = Server.CreateObject(" Scripting.FileSystemObject" )

Dim strTempFolder, strTempFileName
strTempfolder = objFSO.GetSPecialFolder(fsoTempFolder)

strTempFileName = strTempFolder & " \" & objFSO.GetTempName()

' Create the text file
Set ObjTS = objFSO.CreateTextFile(" C:\email\funkdrmr.txt" )

Response.Write " The temporary folder is: " & strTempFolder
Response.Write " <br>A temp. file name: " & strTempFileName

Set objFSO = Nothing ' Clean up!
%>

As you can see, all I' ve added was the 2 lines starting with ' Create.... / and Set ObjTS.

I' ll still be reading up and trying to figure this out, but as said earlier, the more direction I can get, the better!

(in reply to funkdrmr)
funkdrmr

 

Posts: 15
Joined: 9/4/2002
Status: offline

 
RE: Saving Entered Data into Unique Text Files - 9/6/2002 19:39:19   
Sorry about posting 2 messages before a reply, but I don' t want to have to back track on all this good advice! I can now generate the random file, create it, and write a message to it, although it isn' t what is entered in the box. Here' s the code again that I' m using:
<%
Const fsoTempFolder = 2

Dim objFSO, objTS
Set objFSO = Server.CreateObject(" Scripting.FileSystemObject" )

Dim strTempFolder, strTempFileName
strTempfolder = objFSO.GetSPecialFolder(fsoTempFolder)

strTempFileName = strTempFolder & " \" & objFSO.GetTempName()

' Create the text file
Set ObjTS = objFSO.CreateTextFile(strTempFileName)

' Write email to the file
objTS.WriteLine(" Howdy" )


Response.Write " The temporary folder is: " & strTempFolder
Response.Write " <br>A temp. file name: " & strTempFileName

Set objFSO = Nothing ' Clean up!
%>

The bold entries are the new additions. I think what I am missing is a way to address the form on the 1st page to this second page. After I can accomplist writing the text to the created file, I' ll be trying to find a way to specify the directory where the file is saved, as well as changing the filename extension to .eml. If I could get any more info, I' d be eternally greatful!

(in reply to funkdrmr)
funkdrmr

 

Posts: 15
Joined: 9/4/2002
Status: offline

 
RE: Saving Entered Data into Unique Text Files - 9/6/2002 20:59:44   
WOOHOO!!! Another step closer! Here' s the code I have now, with the newer entries in BOLDI' ll post my remaining questions after it:

<%
Const fsoTempFolder = 2

Dim objFSO, objTS
Set objFSO = Server.CreateObject(" Scripting.FileSystemObject" )

Dim strTempFolder, strTempFileName
strTempfolder = objFSO.GetSPecialFolder(fsoTempFolder)

strTempFileName = strTempFolder & " \" & objFSO.GetTempName()

' Create the text file
Set ObjTS = objFSO.CreateTextFile(strTempFileName)

Request.Form(" Sailor_Mail" )

' Write email to the file
ObjTS.WriteLine Request.Form(" Sailor_Mail" )


Response.Write " The temporary folder is: " & strTempFolder
Response.Write " <br>A temp. file name: " & strTempFileName

Set objFSO = Nothing ' Clean up!
%>

As I' m sure you' ve figured out, the form on my 1st page is named Sailor_Mail. After looking up some of the advice you guys have given, as well as searching for as much as I could find, I noticed the WriteLine command. Adding that with the Request.Form command, and BINGO!!! The code now generates a randomly named .tmp file, and saves the text entered in my form on the first page within it! Now for the finishing touches, and (I promise :)) my final questions. Is there a way that I can specify which directory the files are saved to (currently, it is C:\WINN)? Also, how can I change the file extension from .tmp to .txt or .eml?? Thanks again for your help. I look forward to reading the replies soon!

(in reply to funkdrmr)
Doug G

 

Posts: 1189
Joined: 12/29/2001
From: SoCal
Status: offline

 
RE: Saving Entered Data into Unique Text Files - 9/7/2002 3:54:17   
I think you' re gonna be a natural at this :) Us (ex)-swabbies gotta stick together!

If you want to see the scopes that we played a space war game (while in port, for " equipment testing" ), using our trackballs and clicking trackball buttons, and doing this in 1968 long before PARC and Apple, take a look here:

http://www.sterett.org/cic.htm

As for changing the filename, you could just concatenate a .txt extension on to the temp filename, or you could use various string functions to parse off the .tmp and replace it with .txt. You will need to format the message as a proper Outlook Express message with headers & such to change to an .eml format, I believe. I use a POP mail activeX that lets me build a mail message and save as an .eml file myself.

In case you didn' t know, the full VBScript language reference manual is online at http://msdn.microsoft.com/library I think it' s in the Web Development section now.



_____________________________

======
Doug G
======

(in reply to funkdrmr)
funkdrmr

 

Posts: 15
Joined: 9/4/2002
Status: offline

 
RE: Saving Entered Data into Unique Text Files - 9/7/2002 4:09:28   
Thanks for the info Doug. It' s 0100 (1:00 a.m. for the civi types) here, so I' ll check the link you posted more thoroughly tomorrow. As for the .eml thing. I don' t think it needs to be a properly formatted .eml file. It' s just the extension that the " head honchos" program recognizes as a file to process. So, since I don' t have to worry about headers and all that jazz, it brings me back to my last 2 worries...How can I change the extension to .eml, and how can I specify the directory to save this randomly named .eml file? Hopefully, the link will help, but if I could get a little more guidance (example, maybe? :) ) that would be great as well. Thanks again doug!

(in reply to funkdrmr)
Doug G

 

Posts: 1189
Joined: 12/29/2001
From: SoCal
Status: offline

 
RE: Saving Entered Data into Unique Text Files - 9/7/2002 13:06:07   
One easy way is this

strTempFileName = strTempFolder & " \" & objFSO.GetTempName() & " .txt"

You end up with something like " \folder\13244234234.tmp.txt" which is fine in most versions of windows.

If you want to remove the .tmp extension, use something like below (I did it a line at a time so you can see what' s going on). A temp filename with your extension will end up in s1. I haven' t tested this for any syntax errors but should give you the general idea.

s1 = objFSO.GetTempName()
s1 = StrReverse(s1),
s1 = Mid(s1, Instr(s1, " ." , len(s1))
s1 = StrReverse(s1)
s1 = s1 & " .eml"



_____________________________

======
Doug G
======

(in reply to funkdrmr)
funkdrmr

 

Posts: 15
Joined: 9/4/2002
Status: offline

 
RE: Saving Entered Data into Unique Text Files - 9/7/2002 16:26:06   
Ok...I have the file saving to where I want it to now. It' s amazing what a few hours away from the screen will wake you up to. Instead of using ObjFSO.GetSPecialFolder(fsoTempFolder) for strTempfolder, I specified the C:\email folder, and it worked like a charm. Now, on to the file renaming! Looking at your code, Doug, it made sense to me (for what little I have of ASP, anyways :) ) I am now, however, receiving an error stating Type mismatch: ' s1' , and the browser is kind enough to tell me that it' s within Line 24, which happens to be the following line:

s1 = Mid(s1, Instr(s1, " ." , len(s1))

At first, IE told me it was expecting ' )' at the end, so I added that (making 3 instad of the 2 that you posted), and now it comes up with the type mismatch error. With all of the fiddling around I' m doing with it, I believe this will be my last error once it' s resolved. I' ve tried putting the code all on 1 line, or just like you typed it in the last post, but neither comes out correctly. Does is really make a difference how the code is input? Well, I' ll be anxiously awaiting anymore info that I can sqeeze outta you guys. Obviously, if I figure it out, I' ll post here, so we don' t have to mess with this anymore. Thanks again!

(in reply to funkdrmr)
Doug G

 

Posts: 1189
Joined: 12/29/2001
From: SoCal
Status: offline

 
RE: Saving Entered Data into Unique Text Files - 9/7/2002 21:02:45   
That' s because there is an error in the code I posted. There is a missing parentheses

s1 = Mid(s1, Instr(s1, " ." , len(s1))


should be

s1 = Mid(s1, Instr(s1, " ." ), len(s1))

InStr() returns the character position of the " ." in the s1 string (I just used s1 as a variable name ' cause it' s short and easy to type).

Mid returns a substring from the s1 string, beginning at the " ." character position and extending to the end of the s1 string.

Other lines reversed the s1 string before we did this, and then another reversal after this line puts the string back in the right order but minus the file extension.

hth




_____________________________

======
Doug G
======

(in reply to funkdrmr)
funkdrmr

 

Posts: 15
Joined: 9/4/2002
Status: offline

 
RE: Saving Entered Data into Unique Text Files - 9/8/2002 1:36:13   
IT WORKS!!!!!!!!!! Here is the code for this week-long adventure!

<%
Const fsoTempFolder = 2

Dim objFSO, objTS
Set objFSO = Server.CreateObject(" Scripting.FileSystemObject" )

Dim strTempFolder, strTempFileName, strTextFileName
strTempfolder = " C:\email"

strTempFileName = strTempFolder & " \" & objFSO.GetTempName() & " .eml"

' Create the text file
Set ObjTS = objFSO.CreateTextFile(strTempFileName)

' Request the form to be written to the file
Request.Form(" Sailor_Mail" )

' Write email from form to the file
ObjTS.WriteLine Request.Form(" Sailor_Mail" )

' Change tmp filename to eml extension
s1=objFSO.GetTempName()
s1=StrReverse(s1)
s1=Mid(s1, Instr(s1," ." ),len(s1))
s1=StrReverse(s1)
s1=s1 & " .eml"

Response.Write " Your e-mail was saved on the server at: " & strTempFolder
Response.Write " <br>The name of your saved e-mail file is: " & strTempFileName

Set objFSO = Nothing ' Clean up!
%>

To Spooky, Bobby, and Doug, I can' t thank you all enough! I could have never done this without your help. In retrospect, I am extremely appreciative that you did not just write the code out for me. Most of your replies contained links for me to RESEARCH, which made me learn, which allowed me to actually customize a good chunk of this by myself, rather than ask every little line.... Honestly, I thank you guys very much. If any of you are ever in the Seattle area, San Diego, or Hawaii, e-mail me and I' ll see about getting you a tour on our sub as a token of my appreciation. If you need my e-mail, go to www.ussasheville.com My address is on the FT2 Smith link at the bottom. I can' t promise anything until that time comes, but hey, we' ll give it our best shot. Until next time, thanks again!!!

(in reply to funkdrmr)
Doug G

 

Posts: 1189
Joined: 12/29/2001
From: SoCal
Status: offline

 
RE: Saving Entered Data into Unique Text Files - 9/8/2002 12:27:21   
Two small things. One, don' t add the " .eml" on the line where you get the temporary file name. By doing so, later on that' s the extension you remove and then readd, ending up with a name like 2347u234.tmp.eml

The " extension removal" code just removes the last file extension.

Also, you probably should Dim the s1 variable.


_____________________________

======
Doug G
======

(in reply to funkdrmr)
funkdrmr

 

Posts: 15
Joined: 9/4/2002
Status: offline

 
RE: Saving Entered Data into Unique Text Files - 9/8/2002 14:46:38   
AHH! That' s why the " .tmp.eml" is happening! LOL! I was just gonna write a script to take the .tmp out! LOL Glad to know it can be fixed like that. I was so excited that it worked, I just hadn' t worried about it. Two quick questions:

in the line where I get the Temp File name, should I change the .eml back to .tmp? Or just delete that part all together? Also, just out of curiosity, what actually happens when I " Dim" the s1 variable. I understand where to put it within the scheme of things, just not 100% what that does for me. Thanks again!

(in reply to funkdrmr)
Doug G

 

Posts: 1189
Joined: 12/29/2001
From: SoCal
Status: offline

 
RE: Saving Entered Data into Unique Text Files - 9/8/2002 17:00:22   
change strTempFileName = strTempFolder & " \" & objFSO.GetTempName() & " .eml"

to

strTempFileName = strTempFolder & " \" & objFSO.GetTempName()

The GetTempName method apparently adds the .tmp extension to the name it gives you.

Dim a variable to tell the interpreter that the variable exists so it can preallocate space for the variable in memory. You don' t have to Dim variables unless you use the Option Explicit statement (which I always use). Option Explicit will generate an error if you don' t Dim a variable before you try to use it. This is good, it helps you catch typos & such.




_____________________________

======
Doug G
======

(in reply to funkdrmr)
funkdrmr

 

Posts: 15
Joined: 9/4/2002
Status: offline

 
RE: Saving Entered Data into Unique Text Files - 9/8/2002 19:49:16   
Glad to find out I had the right idea with deleting the & " .eml" My web server is at home now, and I' m at work today, so I' m kinda outta luck in testing stuff. Thanks for the explanation about Dim. It' s all slooooooowly coming together! :)

(in reply to funkdrmr)
bobby

 

Posts: 11394
Joined: 8/15/1969
From: Seattle WA USA
Status: offline

 
RE: Saving Entered Data into Unique Text Files - 9/9/2002 14:04:05   
You' re very welcome, actually it helps me a lot, too... I' ve been learning for about a year now... and this forum gives me a chance to learn even more by helping out where I can.

Now that you' re figuring out the basics, it can be fun to look at code examples and break them down... see how they did it.

Glad you' re getting a grasp of it... isn' t it great? More than I ever thought I' d be able to do on a website... :)

BTW - I live in Seattle! I' d love to take a tour of a sub... maybe bring my son along. If the opportunity comes up, let me know!

_____________________________

If con is the opposite of pro, is Congress the opposite of progress?


:)

(in reply to funkdrmr)
funkdrmr

 

Posts: 15
Joined: 9/4/2002
Status: offline

 
RE: Saving Entered Data into Unique Text Files - 9/9/2002 17:12:55   
One more time...here' s what I' ve got :)

<%
Const fsoTempFolder = 2

Dim objFSO, objTS
Set objFSO = Server.CreateObject(" Scripting.FileSystemObject" )

Dim strTempFolder, strTempFileName
strTempfolder = " C:\email"

strTempFileName = strTempFolder & " \" & objFSO.GetTempName()

' Create the text file
Set ObjTS = objFSO.CreateTextFile(strTempFileName)

' Request the form to be written to the file
Request.Form(" Sailor_Mail" )

' Write email from form to the file
ObjTS.WriteLine Request.Form(" Sailor_Mail" )

' Change tmp filename to eml extension
Dim s1
s1=objFSO.GetTempName()
s1=StrReverse(s1)
s1=Mid(s1, Instr(s1," ." ),len(s1))
s1=StrReverse(s1)
s1=s1&" .eml"

Response.Write " Your e-mail was saved on the server at: " & strTempFolder
Response.Write " <br>The name of your saved e-mail file is: " & strTempFileName

Set objFSO = Nothing ' Clean up!
%>

I' ve edited everything as suggested, but I' m still only getting a .tmp file. Before, I was getting .tmp.eml, which was a little better. So close, yet so far away. I' m actually at a loss for words at this point, because from what I have, it makes sense to work. So, I' m not seeing anywhere here where the problem could be lying. Any suggestions, including deal with the .tmp.eml, would be appreciated.

(in reply to funkdrmr)
Doug G

 

Posts: 1189
Joined: 12/29/2001
From: SoCal
Status: offline

 
RE: Saving Entered Data into Unique Text Files - 9/9/2002 21:50:43   
It' s because I threw together a sample using s1 as a variable name, but you never use the s1 filename in your code. You get your temp filename and create your temp file before you do any file extension changing, and never see the results of your hard work. Try this:

<%
Const fsoTempFolder = 2

Dim objFSO, objTS
Dim s1
Set objFSO = Server.CreateObject(" Scripting.FileSystemObject" )

Dim strTempFolder, strTempFileName
strTempfolder = " C:\email"

' Change tmp filename to eml extension
s1=objFSO.GetTempName()
s1=StrReverse(s1)
s1=Mid(s1, Instr(s1," ." ),len(s1))
s1=StrReverse(s1)
s1=s1&" .eml"

strTempFileName = strTempFolder & " \" & s1 ' <<---note the change here

' Create the text file
Set ObjTS = objFSO.CreateTextFile(strTempFileName)

' Request the form to be written to the file
Request.Form(" Sailor_Mail" )

' Write email from form to the file
ObjTS.WriteLine Request.Form(" Sailor_Mail" )

Response.Write " Your e-mail was saved on the server at: " & strTempFolder
Response.Write " <br>The name of your saved e-mail file is: " & strTempFileName

Set objFSO = Nothing ' Clean up!
%>


The filesystem object creates the temp filename for you into a variable named s1. Next, that filename is massaged to change the .tmp extension to .eml

Then the temp filename in the variable s1 is tacked on the end of the path to create your strTempFileName variable, and then you create the temp file with the name you want.

You don' t have to use a separate variable s1, I use s1 as a localized temporary string variable a lot ' cause I' m a lazy typist, and I don' t like typing strTempFileName over and over :)


_____________________________

======
Doug G
======

(in reply to funkdrmr)
funkdrmr

 

Posts: 15
Joined: 9/4/2002
Status: offline

 
RE: Saving Entered Data into Unique Text Files - 9/10/2002 1:40:31   
Ahh! I see the light! After trying it out, I was getting files named filename..eml, so in the line that reads s1=s1&" .eml" I took out the (dot) before eml and all is good. After seeing the fix, I understand now how I was doing things a little backwards. From what I' m getting out of this, all of the file manipulation needs to be done before the file is created. This definitely makes sense now in the scheme of things. I' m happy to say that the code is doing everything I wanted it to do from the beginning. Thanks a lot for all of the help and information. I' m sure you' ll be seeing me on here soon enough, as my boat asked me yesterday, " So, if we can do that, can we put forms on the Intranet to enter data into our Access databases??" AHHHH!! I think I' ve really come on to some great things to streamline the way we do business, but it' s going to be a tremendous learning process the whole way! Thanks again guys!:)

(in reply to funkdrmr)
Page:   [1]

All Forums >> Web Development >> General Web Development >> Saving Entered Data into Unique Text Files
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts