Creation of Folders to hold text files

Results 1 to 3 of 3

Thread: Creation of Folders to hold text files

  1. #1
    Kelsa-Marie Guest

    Default Creation of Folders to hold text files

    I am working with a database which consists of two tables. Category and Sub-Category. A category can have many sub-categories and each sub-category can have many stories. On entry of a new sub-category into the database I need to create a new folder to hold the stories for that specific sub-category. I need to check if the folder exist, and if so enter the associted stories, if not create a new folder. How do I go about accomplishing this and how do I create the text files in the correct folder?

  2. #2
    Join Date
    Dec 1969

    Default ASPFAQs, category FileSystemObject

    The link to the ASPFAQs is at the top right of this page (and most every page on this site).<BR><BR><BR><BR>If that isn&#039;t enough help, ask again. But perhaps in the regular ASP forum? This isn&#039;t a tough question, and you&#039;ll get the answer a lot faster there.<BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: ASPFAQs, category FileSystemObject

    You would want to use the filesystemobject. It would go somthing like this:<BR><BR>dim fso<BR>dim blnFolderExists<BR><BR>set fso = server.createobject ("Scripting.FileSystemObject")<BR><BR>blnFolderExi sts = fso.FolderExists ("Path....")<BR><BR>if blnFolderExists=true then<BR> fso.CreateTextFile ("Path....")<BR>else<BR> fso.CreateFolder ("path...")<BR>end if<BR><BR>Like I said, that&#039;s not exactly right, but should get you on your way.<BR>

Posting Permissions

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