Writing File Extension:?

Results 1 to 2 of 2

Thread: Writing File Extension:?

  1. #1
    Join Date
    Dec 1969

    Default Writing File Extension:?

    I have a form which takes the users information in that form the user has to type in the name of the file he or she wishes to name it. the file name is the captured and wrote to the server but I can&#039;t figure out how to make it save that file with the proper file extension.<BR><BR>Here is some of the code: Look at the Noted parts with the &#039;&#060;&#060;<BR><BR> strJobName=Request.Form("JobName") &#039;&#060;&#060;this is what the name of the file is stored in&#062;&#062;<BR> strPermitHolder_Name = Request.Form("PermitHolder_Name")<BR> strPermitHolder_Phone = Request.Form("PermitHolder_Phone")<BR> strPermitHolder_ContactName = Request.Form("PermitHolder_ContactName")<BR> strPermitHolder_DunBradstreetNum = Request.Form("PermitHolder_DunBradstreetnum")<BR> strPermitHolder_CAPSCustRefID = Request.Form("PermitHolder_CAPSCustRefID")<BR> strPermitHolder_PermitMail = Request.Form("PermitHolder_PermitMail")<BR> strSameAsPermitOne = Request.Form("SameAsPermitOne")<BR> strMailingAgent_Name = Request.Form("MailingAgent_Name")<BR> strMailingAgent_Address = Request.Form("MailingAgent_Address")<BR> strMailingAgent_City = Request.Form("MailingAgent_City")<BR> strMailingAgent_State = Request.Form("MailingAgent_State")<BR> strMailingAgent_ZipCode = Request.Form("MailingAgent_ZipCode")<BR> strMailingAgent_Phone = Request.Form("MailingAgent_Phone")<BR> strMailingAgent_ContactName = Request.Form("MailingAgent_ContactName")<BR> strMailingAgent_DunBradstreetNum = Request.Form("MailingAgent_DunBradstreetNum")<BR> strMailOwner_Name = Request.Form("MailingOwner_Name")<BR> strMailOwner_Address = Request.Form("MailOwner_Address")<BR> strMailOwner_City = Request.Form("MailOwner_City")<BR> strMailOwner_State = Request.Form("MailOwner_State")<BR> strMailOwner_ZipCode = Request.Form("MailOwner_ZipCode")<BR> strMailOwner_Phone = Request.Form("MailOwner_Phone")<BR> strMailOwner_ContactName = Request.Form("MailOwner_ContactName")<BR> strMailOwner_DunBradstreetNum = Request.Form("MailOwner_DunBradstreetNum")<BR><BR> Dim strPath, objFSO, objOpenFile<BR> Const ForWriting = 2<BR> strPath = Server.MapPath(strJobName) &#039;&#060;&#060;I want this file to have a .config or what ever I chose extension&#062;<BR> Set objFSO=_<BR> Server.CreateObject("Scripting.FileSystemObject")< BR> If objFSO.FileExists(strPATH) Then<BR> Set objOpenFile=_<BR> objFSO.OpenTextFile(strPath, ForWriting)<BR> Else<BR> Set objOpenFile=_<BR> objFSO.CreateTextFile(strPath)<BR> End If

  2. #2
    Join Date
    Dec 1969

    Default RE: Writing File Extension:?

    strPath = Server.MapPath(strJobName & ".con")

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts